#1
|
|||
|
|||
que hace?
hola. no tengo ni idea de abap, alguien me puede decir que hace estos tres codigos.
gracias codigo 1 * TABLES: PA0001, PA0105. DATA: no_persona LIKE PA0001-PERNR. SELECT SINGLE PERNR INTO NO_PERSONA FROM PA0001 WHERE PLANS = POSICION_INICIADOR. IF SY-SUBRC = 0. SELECT SINGLE USRID INTO USUARIO FROM PA0105 WHERE PERNR = NO_PERSONA AND BEGDA LE SY-DATUM AND ENDDA GE SY-DATUM. ENDIF. CONCATENATE 'US' USUARIO INTO USUARIO. ENDFUNCTION. codigo 2 KEY LIKE SWOTOBJID-OBJKEY. END_DATA OBJECT. " Do not change.. DATA is g BEGIN_METHOD ZWMSBFTRAERUSUARIOSAP CHANGING DATA: CWDPOSITION LIKE PA0001-PLANS, INITIATOROFWORKFLOWI LIKE WFSYST-INITI SWC_GET_ELEMENT CONTAINER 'CWDPosition' CW CALL FUNCTION 'Z_WF_BUSQUEDA_US_04' EXPORTING POSICION_INICIADOR = CWDPOSITION IMPORTING USUARIO = INITIATOROFWORKFLOWI EXCEPTIONS OTHERS = 01. CASE SY-SUBRC. WHEN 0. " OK WHEN OTHERS. " to be implemented ENDCASE. Act. codigo 3 TABLES: rp50m, ". t531s, pa0001, "Infotipo 0001 p0000, "Infotipo 0000 p0001, pa0019, pcl1, p0019. DATA: gc_cfecha LIKE t531s-tmtxt, gc_clasef LIKE p0019-tmart, gd_fvigen LIKE p0001-endda, gd_fvenc LIKE p0019-termn, gn_nempl LIKE p0000-pernr, gc_nombre LIKE p0001-ename, gc_subty LIKE p0019-subty, gn_posicion LIKE pa0001-plans, gc_text1 LIKE rp50m-text1, gc_text2 LIKE rp50m-text2, gc_text3 LIKE rp50m-text3. TYPES: BEGIN OF STRIT0001, pernr like pa0001-pernr, begda LIKE PA0001-begda, endda LIKE PA0001-endda, END OF STRIT0001. DATA: IT_STR001 TYPE STANDARD TABLE OF STRIT0001, WA_STR001 TYPE STRIT0001. DATA: BEGIN OF zwork OCCURS 0. INCLUDE STRUCTURE pa0019. DATA: END OF zwork. DATA: tx-key LIKE pskey. DATA: BEGIN OF ptext OCCURS 6. "Tabla donde quedan las lineas Texto DATA: line(78). DATA: END OF ptext. DATA: BEGIN OF text-version, nummer TYPE x VALUE ' ', END OF text-version. SELECT * INTO TABLE zwork FROM pa0019 WHERE zzindicawf = 'X' AND mndat = sy-datum. LOOP AT zwork. PERFORM datos_basicos. PERFORM fecha_vigencia. PERFORM clase_fecha. PERFORM textos. PERFORM work1. CLEAR: ptext-line, gc_text1, gc_text2, gc_text3. ENDLOOP. *&---------------------------------------------------------------------* *& Form DATOS_BASICOS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM datos_basicos. SELECT ename INTO gc_nombre FROM pa0001 WHERE pernr = zwork-pernr. ENDSELECT. gd_fvenc = zwork-termn. gc_clasef = zwork-tmart. gn_nempl = zwork-pernr. gc_subty = zwork-subty. gn_posicion = zwork-zzposicion. ENDFORM. " DATOS_BASICOS *&---------------------------------------------------------------------* *& Form WORK1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM work1. * write: / gd_fvenc, gc_cfecha, gn_nempl, gc_nombre, gn_posicion, * gc_text1, gc_text2, gc_text3. CALL FUNCTION 'Z_WF_RH_EVENTO_FECHAS' EXPORTING fecha_plazo = gd_fvenc fecha_vigencia = gd_fvigen tipo_recordatorio = gc_cfecha numero_personal = gn_nempl nombre_personal = gc_nombre posicion_responsable = gn_posicion texto1 = gc_text1 texto2 = gc_text2 texto3 = gc_text3. * ENDFORM. " WORK1 *&---------------------------------------------------------------------* *& Form CLASE_FECHA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM clase_fecha. SELECT tmtxt INTO gc_cfecha FROM t531s WHERE tmart = zwork-tmart. ENDSELECT. ENDFORM. " CLASE_FECHA *&---------------------------------------------------------------------* *& Form TEXTOS *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM TEXTOS. MOVE '0019' TO tx-key-infty. MOVE-CORRESPONDING zwork TO tx-key. IMPORT text-version ptext FROM DATABASE pcl1(tx) ID tx-key. "USING PCL1_EXP_IMP(SAPFP50P). IF zwork-itxex = 'X'. LOOP AT ptext. IF sy-tabix = 1. gc_text1 = ptext-line. ENDIF. IF sy-tabix = 2. gc_text2 = ptext-line. ENDIF. IF sy-tabix = 3. gc_text3 = ptext-line. ENDIF. ENDLOOP. ELSE. CLEAR: gc_text1, gc_text2, gc_text3. ENDIF. ENDFORM. " PRUEBA *&---------------------------------------------------------------------* *& Form FECHA_VIGENCIA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM FECHA_VIGENCIA. select * into corresponding fields of WA_STR001 from pa0001 where pernr = zwork-pernr. append wa_str001 to it_str001. endselect. SORT IT_STR001 BY endda DESCENDING. gd_fvigen = WA_STR001-endda. ENDFORM. " FECHA_VIGENCIA |
#2
|
|||
|
|||
como leer los textos del infotipo 19 seguimientos de tareas
en donde dice
notas: los campos son : RP50M-TEXT1 RP50M-TEXT2 RP50M-TEXT3 Cual es el codigo que tiene la funcion : CALL FUNCTION 'Z_WF_RH_EVENTO_FECHAS' Úlima edición por juanh fecha: 07/07/07 a las 16:20:49. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|