Difference between revisions of "SAP ABAP PSEUDO COMMENTS"
From SapWiki
Line 22: | Line 22: | ||
OBSERVACION: También se puede usar recursividad | OBSERVACION: También se puede usar recursividad | ||
<nowiki> | <nowiki> | ||
+ | select adrnr into table @data(lt_t001) from kna1 WHERE kunnr BETWEEN '1000000000' and '1000000999'. | ||
+ | |||
+ | * LOOP AT lt_t001 INTO data(ls_t001). | ||
+ | * PERFORM form2 USING ls_t001-adrnr. | ||
+ | * ENDLOOP. | ||
+ | |||
data(l_lines) = lines( lt_t001 ). | data(l_lines) = lines( lt_t001 ). | ||
− | |||
PERFORM add USING l_lines. | PERFORM add USING l_lines. | ||
− | + | form add USING l_lines type i. | |
− | + | if l_lines = 0. | |
− | + | return. | |
− | + | endif. | |
− | + | READ TABLE lt_t001 into data(ls_t001) index l_lines. | |
− | + | PERFORM form2 USING ls_t001-adrnr. | |
− | + | l_lines = l_lines - 1. | |
− | + | PERFORM add USING l_lines. | |
+ | ENDFORM. | ||
− | ENDFORM.</nowiki> | + | FORM form2 USING p_adrnr. |
+ | SELECT SINGLE city1 INTO @DATA(l_city) FROM adrc | ||
+ | WHERE addrnumber = @p_adrnr. | ||
+ | write:/ l_city. | ||
+ | ENDFORM. | ||
+ | </nowiki> | ||
=== Al actualizar=== | === Al actualizar=== |
Revision as of 19:07, 8 January 2022
Contents
PSEUDO COMMENTS
Local Nested Reading DB OP (SELECT) found
SELECT * INTO TABLE @DATA(lt_t001) FROM t001. LOOP AT lt_t001 INTO DATA(ls_t001). SELECT SINGLE city1 INTO @DATA(l_city) FROM adrc WHERE addrnumber = @ls_t001-adrnr. "#EC CI_SEL_NESTED ENDLOOP.
NonLocal Nested Reading DB OP (SELECT) found
LOOP AT lt_t001 INTO ls_t001. PERFORM form2 USING ls_t001-adrnr. ENDLOOP. FORM form2 USING p_adrnr. SELECT SINGLE city1 INTO @DATA(l_city) FROM adrc WHERE addrnumber = @p_adrnr. "#EC CI_SEL_NESTED write:/ l_city. ENDFORM.
OBSERVACION: También se puede usar recursividad
select adrnr into table @data(lt_t001) from kna1 WHERE kunnr BETWEEN '1000000000' and '1000000999'. * LOOP AT lt_t001 INTO data(ls_t001). * PERFORM form2 USING ls_t001-adrnr. * ENDLOOP. data(l_lines) = lines( lt_t001 ). PERFORM add USING l_lines. form add USING l_lines type i. if l_lines = 0. return. endif. READ TABLE lt_t001 into data(ls_t001) index l_lines. PERFORM form2 USING ls_t001-adrnr. l_lines = l_lines - 1. PERFORM add USING l_lines. ENDFORM. FORM form2 USING p_adrnr. SELECT SINGLE city1 INTO @DATA(l_city) FROM adrc WHERE addrnumber = @p_adrnr. write:/ l_city. ENDFORM.
Al actualizar
LOOP AT gt_tabla INTO wa_tabla. update zt_tabla set habilitado = 'N' WHERE rut_emp = wa_tabla-rut_emp. "#EC CI_IMUD_NESTED COMMIT WORK. ENDLOOP.
Pragmas
Listado de Pragmas
Pragmas en help.sap.com
Ejemplos
##NO_TEXT
l_string = 'Hola Mundo' ##no_text. constants CV_T7CLCERTIFNBR type CTABNAME value 'T7CLCERTIFNBR' ##NO_TEXT.
##NEEDED
The pragma ##NEEDED tells the check tools that even though the variable isn't used for further processing, the variable is still needed
LOOP AT mt_t511p INTO rs_table_row WHERE molga = cl_hrpaycl_t511p_reader=>gc_molga AND konst = iv_payroll_constant AND begda >= iv_date AND endda <= iv_date ##NEEDED. ENDLOOP.
##CALLED
Form not called
FORM rp_absence_calculation USING ptabs STRUCTURE ptabs ##CALLED.