Difference between revisions of "SAP ABAP PSEUDO COMMENTS"
From SapWiki
| Line 17: | Line 17: | ||
SELECT SINGLE city1 INTO @DATA(l_city) FROM adrc | SELECT SINGLE city1 INTO @DATA(l_city) FROM adrc | ||
WHERE addrnumber = @p_adrnr. "#EC CI_SEL_NESTED | WHERE addrnumber = @p_adrnr. "#EC CI_SEL_NESTED | ||
| + | write:/ l_city. | ||
ENDFORM.</nowiki> | ENDFORM.</nowiki> | ||
| + | |||
| + | OBSERVACION: También se puede usar recursividad | ||
| + | <nowiki> | ||
| + | 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.</nowiki> | ||
=== Al actualizar=== | === Al actualizar=== | ||
Revision as of 18:03, 23 November 2021
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 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.
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.