‎2014 Dec 15 5:13 AM
Hi Experts,
I want to write an ABAP code to call a tcode using an existing variant and it should return the results of that tcode to the current program.
This tcode is not a custom tcode. it is a standard tcode WE09, and it has a variant ABC.
In the report, i have to call WE09 using ABC variant and should get the results back (Idocs which are resulted in WE09 tcode).
Please help me on this.
‎2014 Dec 15 5:23 AM
Hi Vijaya,
You can use SUBMIT report USING SELECTION-SET variant.
‎2014 Dec 15 5:23 AM
Hi Vijaya,
You can use SUBMIT report USING SELECTION-SET variant.
‎2014 Dec 15 5:29 AM
but the same report is used for 2 tcodes WE09 and WE10.
if i use SUBMIT statement on that report, which tcode it will call among those two?
‎2014 Dec 15 5:40 AM
Hi Vijaya,
The parameters you pass will decide which tcode if called. So, if your variant is fixed, it will all desired program only. You need to try it out.
WE09 Search for IDocs by Content
WE10 Search for IDoc in Archive
‎2014 Dec 15 5:45 AM
Thanks a lot Archana and Buddhika for the helpful answer
If I want to get back the result of WE09 to the current program (i mean WE09 will return some Idocs, i want to get all the list of Idocs into an internal table), which statement should be used here?
‎2014 Dec 15 5:55 AM
Hi Vijaya,
You can use SUBMIT REPORT EXPORTING LIST TO MEMORY.
Refer below link for example.
‎2014 Dec 15 6:35 AM
‎2014 Dec 15 5:24 AM
Hi Vijaya,
PASS VARIANT NAME IN ''REUSE_ALV_VARIANT_SELECT '' AND
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PF'
I_CALLBACK_USER_COMMAND = 'PICK'
* I_CALLBACK_TOP_OF_PAGE = ' '
IS_LAYOUT = LT_LAYO
IT_FIELDCAT = LT_FCAT
* IT_SORT = LT_SORTINFO
TABLES
T_OUTTAB = LT_FINAL.
FORM PICK USING COMM LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.
DATA: V_IND TYPE SY-TABIX.
CASE COMM.
WHEN '&IC1
read table........
CALL TRANSACTION''
ENDCASE.
‎2014 Dec 15 5:39 AM
SUBMIT <programname> using SELECTION-SET 'ABC'.
‎2014 Dec 15 5:46 AM
Hi
Any problem with set paratmer and call transaction combinations?
If on the selection screen of WE09, the field have no parameter id, then you can using
'call transaction using bdc_tab', detail grammar please refer F1.
And the return result, you can use class 'cl_salv_bs_runtime_info' to get.
regards,
Archer.