Application Development 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: 

Batch Input transaction PFCG

Former Member
0 Kudos

Dear all,

I'm trying to make a Batch Input programme for transaction PFCG. Basically it has to enter a role name (which in this example is static), go to a tab/subscreen and push a button. The problem is that I seem not to be able to get to the subscreen to push the button. When I do this onscreen I see OK_Code TAB9 being posted after which processeing stops (no error). If i reproduce the steps myself it works perfectly.

The code:

*First Screen inserting correct username and press edit button.

CLEAR bdcdata.

bdcdata-program = 'SAPLPRGN_TREE'.

bdcdata-dynpro = '0100'.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'AGR_NAME_NEU'.

bdcdata-fval = 'testcomposite'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_OKCODE'.

bdcdata-fval = '=AEND'.

APPEND bdcdata.

*NEXT SCREEN, Pressing the button "Copy Menu"

CLEAR bdcdata.

bdcdata-program = 'SAPLPRGN_TREE'.

bdcdata-dynpro = '0300'.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_CURSOR'.

bdcdata-fval = 'S_AGR_TEXTS-TEXT'.

append bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_OKCODE'.

bdcdata-fval = '=TAB9'.

APPEND bdcdata.

  • CLEAR bdcdata.

  • bdcdata-fnam = 'BDC_SUBSCR'.

  • bdcdata-fval = 'SAPLPRGN_TREE 0321SUB1'.

  • APPEND bdcdata.

CLEAR BDCDATA.

BDCDATA-PROGRAM = 'SAPLPRGN_TREE'.

BDCDATA-DYNPRO = '0300'.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_CURSOR'.

bdcdata-fval = 'S_AGR_TEXTS-TEXT'.

append bdcdata.

CLEAR bdcdata.

bdcdata-fnam = 'BDC_OKCODE'.

bdcdata-fval = '=AD10'.

APPEND bdcdata.

1 REPLY 1

Former Member
0 Kudos

Hi

The PFCG is enjoy transaction and so I believe it couldn't work by BDC. You should try another solution.

Max

Message was edited by: max bianchi