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

Problem with BDC on PP01

Former Member
0 Likes
958

Hi All,

I'm facing a problem in a BDC on PP01, the problem is, i'm unable to move forward to the second screen(MP100000,2000), i.e., the <b>ok_code</b> in the initial screen is not working(<b>=INSE</b>), the infotype selection button is getting deselected(<b>Object</b>) and the date range is getting changed.

include bdcrecx1.

begin of t_hrp1000 occurs 0,

otype like pphdr-otype,

seark like pm0d1-seark,

begda(10),

endda(10), "like SY-DATUM,

short like p1000-short,

stext like p1000-stext,

end of t_hrp1000,

loop at t_hrp1000.

perform bdc_dynpro using 'SAPMH5A0' '5000'.

perform bdc_field using 'BDC_OKCODE'

'=INSE'.

perform bdc_field using 'PPHDR-PLVAR'

'01'.

perform bdc_field using 'PPHDR-OTYPE'

t_hrp1000-otype.

perform bdc_field using 'PM0D1-SEARK'

t_hrp1000-seark.

perform bdc_field using 'BDC_CURSOR'

'PPHDR-ENDDA'.

perform bdc_field using 'PM0D1-TIMR6'

'X'.

perform bdc_field using 'PPHDR-BEGDA'

t_hrp1000-begda.

perform bdc_field using 'PPHDR-ENDDA'

t_hrp1000-endda.

perform bdc_field using 'MARKFELD(01)'

'X'.

perform bdc_dynpro using 'MP100000' '2000'.

perform bdc_field using 'BDC_CURSOR'

'P1000-STEXT'.

perform bdc_field using 'BDC_OKCODE'

'=UPD'.

perform bdc_field using 'P1000-BEGDA'

t_hrp1000-begda.

perform bdc_field using 'P1000-ENDDA'

t_hrp1000-endda.

perform bdc_field using 'P1000-SHORT'

t_hrp1000-short.

perform bdc_field using 'P1000-STEXT'

t_hrp1000-stext.

perform bdc_dynpro using 'SAPMH5A0' '5000'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_field using 'PPHDR-PLVAR'

'01'.

perform bdc_field using 'PPHDR-OTYPE'

t_hrp1000-otype.

perform bdc_field using 'PM0D1-SEARK'

t_hrp1000-seark.

perform bdc_transaction using 'PP01' " CALL TRANSACTION..

endloop.

Hi All,

I'm facing a problem in a BDC on PP01, the problem is, i'm unable to move forward to the second screen(MP100000,2000), i.e., the <b>ok_code</b> in the initial screen is not working(<b>=INSE</b>), the infotype selection button is getting deselected(<b>Object</b>) and the date range is getting changed.

include bdcrecx1.

begin of t_hrp1000 occurs 0,

otype like pphdr-otype,

seark like pm0d1-seark,

begda(10),

endda(10), "like SY-DATUM,

short like p1000-short,

stext like p1000-stext,

end of t_hrp1000,

loop at t_hrp1000.

perform bdc_dynpro using 'SAPMH5A0' '5000'.

perform bdc_field using 'BDC_OKCODE'

'=INSE'.

perform bdc_field using 'PPHDR-PLVAR'

'01'.

perform bdc_field using 'PPHDR-OTYPE'

t_hrp1000-otype.

perform bdc_field using 'PM0D1-SEARK'

t_hrp1000-seark.

perform bdc_field using 'BDC_CURSOR'

'PPHDR-ENDDA'.

perform bdc_field using 'PM0D1-TIMR6'

'X'.

perform bdc_field using 'PPHDR-BEGDA'

t_hrp1000-begda.

perform bdc_field using 'PPHDR-ENDDA'

t_hrp1000-endda.

perform bdc_field using 'MARKFELD(01)'

'X'.

perform bdc_dynpro using 'MP100000' '2000'.

perform bdc_field using 'BDC_CURSOR'

'P1000-STEXT'.

perform bdc_field using 'BDC_OKCODE'

'=UPD'.

perform bdc_field using 'P1000-BEGDA'

t_hrp1000-begda.

perform bdc_field using 'P1000-ENDDA'

t_hrp1000-endda.

perform bdc_field using 'P1000-SHORT'

t_hrp1000-short.

perform bdc_field using 'P1000-STEXT'

t_hrp1000-stext.

perform bdc_dynpro using 'SAPMH5A0' '5000'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_field using 'PPHDR-PLVAR'

'01'.

perform bdc_field using 'PPHDR-OTYPE'

t_hrp1000-otype.

perform bdc_field using 'PM0D1-SEARK'

t_hrp1000-seark.

perform bdc_transaction using 'PP01' " CALL TRANSACTION..

endloop.

5 REPLIES 5
Read only

Former Member
0 Likes
750

Hi Ravi,

I think you should record BDC on transaction 'PP02'.

*********if useful plz reward************

Message was edited by: Vaibhav Modi

Read only

0 Likes
750

Hi Vaibhav,

What difference does it make? Here i'm trying to create objects,isn't it? Please give me more details.

Read only

0 Likes
750

Ravi,

To my knowledge PP01 transaction is used for entering the data manually.

PP02 transaction is ment for BDC & recording.

Try it & let me know if it has worked for u or not.

Read only

0 Likes
750

Hi Vaibhav,

ur suggestion worked, thank u.

Read only

0 Likes
750

Hi, I tired using PP02, it says record created but when i Look at PA20 ..it i snot assigned.

I am creating employee data through BDC using PA40 and then using PP02 to assign position.

regards

Lakhbir