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: 

BDC help

Former Member
0 Kudos

hi folks,

I am having two issues related to the BDC transaction, I have recorded the below transaction using the BDC transaction recorder

'X' 'SAPMP50A' '1000',

' ' 'BDC_OKCODE' '=INS',

' ' 'RP50G-PERNR' REC-PERNR,

' ' 'BDC_CURSOR' 'T582S-ITEXT(01)',

' ' 'RP50G-SELEC(01)' 'X',

' ' 'RP50G-TIMR6' 'X',

'X' 'MP000000' '2000',

' ' 'BDC_CURSOR' 'P0000-MASSG',

' ' 'BDC_OKCODE' '/00',

' ' 'P0000-BEGDA' format_termin,

' ' 'P0000-MASSN' 'TM',

' ' 'P0000-MASSG' zmassg,

'X' 'MP000000' '2000',

' ' 'BDC_CURSOR' 'P0000-BEGDA',

' ' 'BDC_OKCODE' 'UPD',

' ' 'P0000-BEGDA' format_termin,

' ' 'P0000-MASSN' 'TM',

' ' 'P0000-MASSG' zmassg,

'X' 'MP000100' '2010',

' ' 'BDC_CURSOR' 'P0001-SACHZ',

' ' 'BDC_OKCODE' '/00',

' ' 'P0001-BEGDA' format_termin,

' ' 'P0001-ENDDA' '12/31/9999',

*' ' 'P0001-BTRTL' 'SNXP',

*' ' 'P0001-ABKRS' 'GA',

*' ' 'P0001-ANSVH' '04',

*' ' 'P0001-SACHP' 'H13',

*' ' 'P0001-PLANS' '99999999',

' ' 'P0001-SACHZ' 'P99',

*' ' 'P0001-SACHA' '026',

'X' 'MP000100' '2010',

' ' 'BDC_CURSOR' 'P0001-SACHZ',

' ' 'BDC_OKCODE' 'UPD',

' ' 'P0001-BEGDA' format_termin,

' ' 'P0001-ENDDA' '12/31/9999',

*' ' 'P0001-BTRTL' 'SNXP',

*' ' 'P0001-ABKRS' 'GA',

*' ' 'P0001-ANSVH' '04',

*' ' 'P0001-SACHP' 'H13',

*' ' 'P0001-PLANS' '99999999',

' ' 'P0001-SACHZ' 'P99',

*' ' 'P0001-SACHA' '026',

'X' 'MP003500' '2000',

' ' 'BDC_CURSOR' 'P0035-DAT35',

' ' 'BDC_OKCODE' '/00',

' ' 'P0035-BEGDA' format_termin,

' ' 'P0035-ENDDA' '12/31/9999',

' ' 'P0035-BLEHR' ZBLEHR,

' ' 'P0035-DAT35' format_termin,

'X' 'MP003500' '2000',

' ' 'BDC_CURSOR' 'P0035-BEGDA',

' ' 'BDC_OKCODE' '=UPD',

' ' 'P0035-BEGDA' format_termin,

' ' 'P0035-ENDDA' '12/31/9999',

' ' 'P0035-BLEHR' ZBLEHR,

' ' 'P0035-DAT35' format_termin,

'X' 'MP005000' '3000',

' ' 'BDC_CURSOR' 'P0050-BEGDA(01)',

' ' 'BDC_OKCODE' '=DLIM',

' ' 'RP50M-BEGDA' format_termin,

' ' 'RP50M-ENDDA' '12/31/9999',

' ' 'RP50M-ABGRD' format_termin,

' ' 'RP50M-PAGEA' ' 1',

' ' 'RP50M-SELE2(01)' 'X',

' ' 'BDC_OKCODE' '/11',

' ' 'BDC_OKCODE' '/11'.

The process flow:

Menu Path: Human Resources > Personnel Management -> HR Master Data -> Maintain -> Enter

Personnel Number -> Select Actions (0000) Infotype -> Create -> Enter the defined date -> Select Action – Termination -> Insert Termination Reason -> Click SAVE -> Insert P99 in Time Administrator field -> click SAVE _->Populate 12/31/9999 in End Date on IT 0035 -> Populate "ELIG" -> Populate Termination Date in DAT 35 -> click SAVE -> Delimit IT 0050.

I have two questions....

<b>First one</b>, the above code was recorded from the transaction recorder to update the records in infotypes 0000, 0001, 0035 and 0050.

The records are getting updated into the infotypes in the foreground, but when you run the code in the background the records are not getting updated into the infotypes.

In such case what can I do?

Secondly, the delimit action for IT0050 is not getting registered into the recorder (I know I had already posted this question) How can I fix it?

I have been playing around with this for sometime, could not get to an approriate soultion.

Any leads or guidance to solve this would be really helpful to take it forward.

Thanks in advance folks.

Vinu

Second

9 REPLIES 9

vinod_gunaware2
Active Contributor
0 Kudos

Try to trap error in beckground

  • Set the parameters for Call Transaction

CLEAR WA_CTU_PARAMS.

WA_CTU_PARAMS-DISMODE = 'N'.

WA_CTU_PARAMS-UPDMODE = 'S'.

WA_CTU_PARAMS-NOBINPT = 'X'.

WA_CTU_PARAMS-NOBIEND = 'X'.

WA_CTU_PARAMS-DEFSIZE = 'X'.

CALL TRANSACTION 'MM01' USING T_BDCDATA OPTIONS FROM WA_CTU_PARAMS

MESSAGES INTO T_BDCMSGCOLL.

COMMIT WORK AND WAIT.

LOOP AT T_BDCMSGCOLL INTO WA_BDCMSGCOLL.

CLEAR ERR_LOG.

W_MSGNO = WA_BDCMSGCOLL-MSGNR.

CALL FUNCTION 'WRITE_MESSAGE'

EXPORTING

MSGID = WA_BDCMSGCOLL-MSGID

MSGNO = W_MSGNO

MSGTY = WA_BDCMSGCOLL-MSGTYP

IMPORTING

MESSG = ERR_LOG.

regards

vinod

0 Kudos

Vinod,

Is 'ERR_LOG' a text file or a table?

Can you elaborate on that ?

Thanks.

Vinu

Former Member
0 Kudos

Are you running this as a session or call transaction? And what transaction is this?

Rob

Message was edited by: Rob Burbank

0 Kudos

I am running this transaction using call transaction and the transaction is PA30.

Vinu

vinod_gunaware2
Active Contributor
0 Kudos

it is an internal table.

DATA : T_BDCMSGCOLL TYPE TABLE OF BDCMSGCOLL WITH HEADER LINE.

DATA : WA_BDCMSGCOLL TYPE BDCMSGCOLL.

DATA : ERR_LOG TYPE MESSAGE.

regards

vinod

0 Kudos

Vinod,

it is throwing an 'Status' message that 'no batch input data for the screen'

but not metioning which screen number it is talking about.

Thanks

Vinu.

0 Kudos

It should be there. What are the exact contents of the message table?

Rob

0 Kudos

Thanks guys, I have awarded the points to Vinod. Sorry for getting back to this thread late because I was caught up in a different assignment. Now I am back to this. Really appreciate your paitence.

Vinu

vinod_gunaware2
Active Contributor
0 Kudos

Vinu

WA_CTU_PARAMS-DISMODE = 'A'.

Make parameter as forground and if it works in foreground

then it should work in background also.

Or u have debugg by changing Sy-batch parameter = 'X'

which treat as job background.

regards

vinod