ls_bukrs = 'IEQ'. AUTHORITY-CHECK OBJECT 'F_BKPF_BUK' ID 'BUKRS' FIELD gs_table-bukrs ID 'ACTVT' FIELD '03'. IF sy-subrc = 0. SELECT SINGLE kostl, "#EC CI_SEL_NESTED waers, wrbtr FROM zvim_wf_det_blkv WHERE bukrs = @gs_table-bukrs AND belnr = @gs_table-belnr AND gjahr = @gs_table-gjahr AND buzei IN ( SELECT CAST( RIGHT( wi_text, 3 ) AS NUMC( 3 ) ) AS buzei FROM swwwihead WHERE wi_id = @gs_worklist-wi_chckwi ) INTO (@gs_table-kostl, @gs_table-waers, @gs_table-wrbtr). SELECT ktext "#EC CI_SEL_NESTED UP TO 1 ROWS FROM cskt INTO gs_table-ktext WHERE spras = sy-langu AND kokrs = 'BENG' AND kostl = gs_table-kostl ORDER BY datbi DESCENDING. ENDSELECT. ELSE. ls_bukrs-low = gs_table-bukrs. COLLECT ls_bukrs INTO lr_bukrs. ENDIF. IF lr_bukrs[] IS INITIAL. ls_bukrs-low = 'XX'. APPEND ls_bukrs TO lr_bukrs. ENDIF.
martedì 31 luglio 2018
Select annidata con cast
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento