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

Recording coding ?

Former Member
0 Likes
738

Hi,

Can you tell me how to write a code like this?

PERFORM dynpro USING: 'X' 'SAPMF05A' '0100',

' ' 'BKPF-bldat' itab-date,

' ' 'BKPF-blart' 'AF',

' ' 'BKPF-bukrs' 'ABCE',

' ' 'BKPF-waers' 'USD',

' ' 'RF05A-newko' itab-kunnr,

' ' 'BDC_OKCODE' '/00'.

I think it is a type of recording, but when I record and generate a program, it is full of subroutines. (Not exactly like above).

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
700

YOu can see as many performs as the number of lines in the bdc.

YOu have a ':' which means you may not write the perofrm dynpro each and every time.

PERFORM dynpro USING: 'X' 'SAPMF05A' '0100'.

' ' 'BKPF-bldat' itab-date,

' ' 'BKPF-blart' 'AF',

' ' 'BKPF-bukrs' 'ABCE',

' ' 'BKPF-waers' 'USD',

' ' 'RF05A-newko' itab-kunnr,

' ' 'BDC_OKCODE' '/00'.

Regards,

Ravi

5 REPLIES 5
Read only

Former Member
0 Likes
701

YOu can see as many performs as the number of lines in the bdc.

YOu have a ':' which means you may not write the perofrm dynpro each and every time.

PERFORM dynpro USING: 'X' 'SAPMF05A' '0100'.

' ' 'BKPF-bldat' itab-date,

' ' 'BKPF-blart' 'AF',

' ' 'BKPF-bukrs' 'ABCE',

' ' 'BKPF-waers' 'USD',

' ' 'RF05A-newko' itab-kunnr,

' ' 'BDC_OKCODE' '/00'.

Regards,

Ravi

Read only

Former Member
0 Likes
700

':' is a way to eliminate repeating the portion of the code that is in front of the ':'. It is just to improve the readability of the code. It is to be interpreted as


PERFORM dypro USING 'X' 'SAPMF05A'    '0100'.
PERFORM dypro USING ' ' 'BKPF-bldat'  itab-date.
PERFORM dypro USING ' ' 'BKPF-blart'  'AF'.
PERFORM dypro USING ' ' 'BKPF-bukrs'  'ABCE'.
PERFORM dypro USING ' ' 'BKPF-waers'  'USD'.
PERFORM dypro USING ' ' 'RF05A-newko' itab-kunnr.
PERFORM dypro USING ' ' 'BDC_OKCODE'  '/00'.

Read only

Former Member
0 Likes
700

Hi,

using ':' this you can avoid repeated portion .

PERFORM dynpro USING: 'X' 'SAPMF05A' '0100',
' ' 'BKPF-bldat' itab-date,
' ' 'BKPF-blart' 'AF',
' ' 'BKPF-bukrs' 'ABCE',
' ' 'BKPF-waers' 'USD',
' ' 'RF05A-newko' itab-kunnr,
' ' 'BDC_OKCODE' '/00'.

Regards

vijay

Read only

0 Likes
700

Guys, thanks for your immediate help. But that's not my question.

My question is how can I code like

PERFORM dynpro USING: 'X' 'SAPMF05A' '0100',

(I mean I just don't understand these Xs, program names and numbers here. I know it is done by recording but can you tell me how to write a code like above using recording or whatever)

I appreciate your kind help.

Thanks.

Read only

0 Likes
700

'X' indicates that you are entering that screen 0100 of program SAPMF05A. After that what you are doing is filling the value for each field on that screen as needed.

So how do you know which screen and which field and which program it is? Go to any transaction, press F1 on any field, and then click on the technical help button. This will tell which program, what the field name and the screen is for batch input. This is the tedious way to do it. So you normally do a recording using transaction code SHDB.