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 to call VF01

former_member215781
Active Participant
0 Kudos

Hi...

I am fresher to ABAP.

I have a following requirement:

create an invoice for this delivery, by a BDC call (VF01, document-type?)

Trigger output on delivery using RSNAST00 passing parameters output application, object key, output type.

Could someone guide with step-to-step solution.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

For writing a BDC to VF01 transaction, goto SHDB transaction and give the transaction name as VF01 and click start recording give all the inputs there and system will write the piece of code for you and you can use the same.

For calling the RSNAST00 program you need to write a submit command in your custom program like below:-

SUBMIT rsnast00

WITH s_kappl IN range_tab_kappl

WITH s_objky IN range_tab_objky

WITH s_kschl IN so_kschl

WITH p_again = x

AND RETURN.

Instead of that create a variant for the program RSNAST00 and create a background job for that program and that will process all the output which are triggered and not yet processed.

Thanks,

Mahesh.

4 REPLIES 4

Former Member
0 Kudos

Hi,

For writing a BDC to VF01 transaction, goto SHDB transaction and give the transaction name as VF01 and click start recording give all the inputs there and system will write the piece of code for you and you can use the same.

For calling the RSNAST00 program you need to write a submit command in your custom program like below:-

SUBMIT rsnast00

WITH s_kappl IN range_tab_kappl

WITH s_objky IN range_tab_objky

WITH s_kschl IN so_kschl

WITH p_again = x

AND RETURN.

Instead of that create a variant for the program RSNAST00 and create a background job for that program and that will process all the output which are triggered and not yet processed.

Thanks,

Mahesh.

0 Kudos

Hi,

Can u give me a step-to-step guidance for writing a BDC for VF01 call.

Thanks.

0 Kudos

Hi,

Please find the BDC code for the VF01 transaction.

Change the billing type and delivery number as they are variable.

perform bdc_dynpro using 'SAPMV60A' '0102'.

perform bdc_field: using 'BDC_OKCODE' '=SICH',

'RV60A-FKART' 'ZF2',

'KOMFK-VBELN(01)' '80000141'.

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR it_BDCDATA.

it_BDCDATA-PROGRAM = PROGRAM.

it_BDCDATA-DYNPRO = DYNPRO.

it_BDCDATA-DYNBEGIN = 'X'.

APPEND it_BDCDATA.

ENDFORM.

FORM BDC_FIELD USING FNAM FVAL.

  • IF FVAL <> NODATA.

CLEAR it_BDCDATA.

it_BDCDATA-FNAM = FNAM.

it_BDCDATA-FVAL = FVAL.

APPEND it_BDCDATA.

  • ENDIF.

ENDFORM.

Then use the call transaction statement on VF01 and it will solve your purpose.

Thanks,

Mahesh.