DATA: wa_extension TYPE bapiparex, ext_value(960) TYPE c, wa_accit TYPE accit, l_ref TYPE REF TO data. DATA:ls_exte TYPE bapiparex. FIELD-SYMBOLS: <l_struc> TYPE any, <l_field> TYPE any. *----如果需要创建预制凭证,则调用此段------begin-----* READ TABLE c_extension2 INTO ls_exte WITH KEY structure = 'PARK'. IF sy-subrc = 0. MOVE '2' TO c_acchd-status_new. DELETE c_extension2 INDEX sy-tabix. ENDIF. *----如果需要创建预制凭证,则调用此段------end-----* SORT c_extension2 BY structure. LOOP AT c_extension2 INTO wa_extension. AT NEW structure. CREATE DATA l_ref TYPE (wa_extension-structure). ASSIGN l_ref->* TO <l_struc>. ENDAT. CONCATENATE wa_extension-valuepart1 wa_extension-valuepart2 wa_extension-valuepart3 wa_extension-valuepart4 INTO ext_value. MOVE ext_value TO <l_struc>. ASSIGN COMPONENT 'POSNR' OF STRUCTURE <l_struc> TO <l_field>. READ TABLE c_accit WITH KEY posnr = <l_field> INTO wa_accit. IF sy-subrc IS INITIAL. MOVE-CORRESPONDING <l_struc> TO wa_accit. MODIFY c_accit FROM wa_accit INDEX sy-tabix. ENDIF. ENDLOOP.
标签:wa,增强,会计凭证,extension,INTO,accit,extension2,TYPE From: https://www.cnblogs.com/Anyohh233/p/17786306.html