Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Variant recording BDC

Former Member
0 Likes
1,246

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,048

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?

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?

6 REPLIES 6
Read only

madhu_vadlamani
Active Contributor
0 Likes
1,048

HI satheesh,

Please take recorded code and keep in a Zreport and run in back ground.

Regards,

Madhu.

Read only

Former Member
0 Likes
1,049

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?

Read only

0 Likes
1,048

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

Read only

Former Member
0 Likes
1,048

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.

Read only

Former Member
0 Likes
1,048

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.

Read only

Former Member
0 Likes
1,048

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.