Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SUBMIT h99cwtr0 EXPORTING LIST TO MEMORY AND RETURN
- * VIA SELECTION-SCREEN
- WITH pnppernr-low EQ ps_pa2002-pernr
- WITH begd_cal EQ gp_begda
- WITH endd_cal EQ gp_endda
- WITH s_lgart IN lr_lgart
- .
- "obtener el return
- CALL FUNCTION 'LIST_FROM_MEMORY'
- TABLES
- listobject = list_tab
- EXCEPTIONS
- not_found = 1
- OTHERS = 2.
- CALL FUNCTION 'LIST_TO_ASCI'
- EXPORTING
- list_index = -1
- TABLES
- listasci = lt_h99ansi
- listobject = list_tab
- EXCEPTIONS
- empty_list = 1
- list_index_invalid = 2
- OTHERS = 3.
- "limpio los datos
- IF sy-subrc = 0.
- DESCRIBE TABLE lt_h99ansi LINES lv_list_tab_len.
- IF lv_list_tab_len < 3.
- lv_to = lv_list_tab_len.
- ELSE.
- lv_to = 3.
- ENDIF.
- "remuevo el footer de la tabla
- DELETE lt_h99ansi FROM lv_list_tab_len.
- "remuevo el header de la tabla
- DELETE lt_h99ansi FROM 1 TO lv_to - 1.
- ENDIF.
- "parseo los datos
- LOOP AT lt_h99ansi INTO ls_h99ansi.
- IF ls_h99ansi-line CP '*-----------*'.
- ELSE.
- SPLIT ls_h99ansi AT '|' INTO
- lv_dummystr
- ls_pc00_m99_cwtr_ret-bukrs
- ls_pc00_m99_cwtr_ret-bukrs_txt
- ls_pc00_m99_cwtr_ret-persa
- ls_pc00_m99_cwtr_ret-persa_txt
- ls_pc00_m99_cwtr_ret-abkrs
- ls_pc00_m99_cwtr_ret-abkrs_txt
- ls_pc00_m99_cwtr_ret-permo
- ls_pc00_m99_cwtr_ret-permo_txt
- ls_pc00_m99_cwtr_ret-fpper
- * ls_pc00_m99_cwtr_ret-paydt
- lv_paydate_dummy
- ls_pc00_m99_cwtr_ret-payty
- ls_pc00_m99_cwtr_ret-payid
- ls_pc00_m99_cwtr_ret-molga
- ls_pc00_m99_cwtr_ret-lgart
- ls_pc00_m99_cwtr_ret-lgart_txt
- * ls_pc00_m99_cwtr_ret-ANZHL
- lv_anzhl_dummy
- * ls_pc00_m99_cwtr_ret-BETRG
- lv_betrg_dummy
- ls_pc00_m99_cwtr_ret-waers
- lv_dummystr
- .
- REPLACE ALL OCCURRENCES OF '.' IN lv_anzhl_dummy WITH ''.
- REPLACE ALL OCCURRENCES OF ',' IN lv_anzhl_dummy WITH '.'.
- ls_pc00_m99_cwtr_ret-anzhl = lv_anzhl_dummy.
- REPLACE ALL OCCURRENCES OF '.' IN lv_betrg_dummy WITH ''.
- REPLACE ALL OCCURRENCES OF ',' IN lv_betrg_dummy WITH '.'.
- ls_pc00_m99_cwtr_ret-betrg = lv_betrg_dummy.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement