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

How to trap the two function code in the bdc

Former Member
0 Likes
572

Dear All,

I have a bdc program now i need to pick up function code based on some condition. means if some condition then goto one function code and else don't go. I tried it but not working. It is working in shdb but not in the program.

eg.

if not zcontract_no is initial.

  • perform bdc_dynpro using 'SAPMZW_CREATE_SALES_ORDER_STD'

  • '9000'.

  • perform bdc_field using 'BDC_CURSOR'

  • 'P_CONTRACT'.

perform bdc_field using 'BDC_OKCODE'

<b>'=COPY'.</b>

endif.

perform bdc_field using 'BDC_OKCODE'

<b>'=SUBMIT'</b>.

Please suggest.

Regds,

Anup

1 REPLY 1
Read only

Former Member
0 Likes
439

Hi ,

In your second case u r not specifying the BDC DYNPRO screen number , your code should be

if not zcontract_no is initial.

perform bdc_field using 'BDC_OKCODE'

'=COPY'.

else..

perform bdc_field using 'BDC_OKCODE'

'=SUBMIT'.

endif.

Kunal