2011 Feb 14 2:45 PM
My requirement Is run the program RKPEP003 In the background export the output.
So I have recorded the program using SHDB and when I copied the recording Into a Custom program.
While I am processing the recording again I am not able to get the variant name and as itu2019s coming as below
SAPMSSY0 0120 X
BDC_CURSOR 14/31
BDC_OKCODE =PICK
Here Its picking based on the numbers. But I want to run the program with variant name.
So please some one help me how to run the program based with variant value using BDC. (I donu2019t want to run in SM37).
Regards,
Satheesh.
2011 Feb 14 3:48 PM
For some reason, you do not want to use the spool output from SM37?
Instead of using BDC, Is it possible for you to SUBMIT the report program and use EXPORT LIST FROM memory and then upload the internal table from the list to file?
My requirement Is run the program RKPEP003 In the background export the output.
So I have recorded the program using SHDB and when I copied the recording Into a Custom program.
While I am processing the recording again I am not able to get the variant name and as itu2019s coming as below
SAPMSSY0 0120 X
BDC_CURSOR 14/31
BDC_OKCODE =PICK
Here Its picking based on the numbers. But I want to run the program with variant name.
So please some one help me how to run the program based with variant value using BDC. (I donu2019t want to run in SM37).
Regards,
Satheesh.
2011 Feb 14 3:40 PM
HI satheesh,
Please take recorded code and keep in a Zreport and run in back ground.
Regards,
Madhu.
2011 Feb 14 3:48 PM
For some reason, you do not want to use the spool output from SM37?
Instead of using BDC, Is it possible for you to SUBMIT the report program and use EXPORT LIST FROM memory and then upload the internal table from the list to file?
2011 Feb 14 3:52 PM
Hi,
Keep that code in a report and use submit
***Giving data from
move zcust to t_cust.
EXPORT t_cust TO MEMORY ID 'TABLE'.
*SUBMIT ZBDC_CUSTOMER.
SUBMIT ZCUSTOMER and return.
***Getting data from program
DATA it_str TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
.
IMPORT it_str FROM MEMORY ID 'MESS'. "TO GET DATA FROM REPORT.
LOOP AT it_str.
MOVE-CORRESPONDING it_str to return.
APPEND return.
ENDLOOP.
Regards,
Madhu
2011 Feb 14 4:54 PM
Hi Madhu,
Thanks for your reply. Yes I have tried that option, but the reason why I am choose the BDC is, I need to export the ALV output (this output layout design will be set by the user), So if I use submit report I am not able to get the output same as ALV output.
Regards,
Satheesh.
2016 Jun 16 3:52 PM
Hi satheesh,
I have the same problem and it is not possible to use SUBMIT in my case.
Have you fixed the problem?
Thanks in advance.
Regards,
Madhu.
2016 Jun 16 5:10 PM
I think I got it in order to get variant by name.
Check out this example:
PERFORM dynpro USING : 'X' 'ZEXPS020' '1000',
' ' 'BDC_OKCODE' '/EGET',
' ' 'BDC_CURSOR' 'S_ZDSTR-LOW',
'X' 'SAPMSSY0' '0120',
' ' 'BDC_CURSOR' '04/12',
' ' 'BDC_OKCODE' '=%SC',
'X' 'SAPLSYSF' '0800',
' ' 'BDC_CURSOR' 'SCAN_STRING-START',
' ' 'BDC_OKCODE' '=SCAN',
' ' 'RSYSF-STRING' i_tab-slset,
' ' 'SCAN_STRING-START' ' ',
' ' 'SCAN_STRING-LIMIT' '100',
'X' 'SAPMSSY0' '0120',
' ' 'BDC_CURSOR' '03/08',
' ' 'BDC_OKCODE' '=POSI',
'X' 'SAPMSSY0' '0120',
' ' 'BDC_OKCODE' '=PICK',
'X' 'ZEXPS020' '1000',
' ' 'BDC_OKCODE' '=ONLI'.
You can try replacing program 'ZEXPS020' and variant i_tab-slset.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |