‎2006 Jun 16 3:33 PM
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
‎2006 Jun 16 3:38 PM
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
‎2006 Jun 16 3:38 PM
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
‎2006 Jun 16 5:00 PM
':' 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'.
‎2006 Jun 16 5:04 PM
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
‎2006 Jun 16 7:11 PM
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.
‎2006 Jun 16 7:33 PM
'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.