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

Urgent - Problem with FM SD_SALESDOCUMENT_CREATE

Former Member
0 Likes
1,138

I am using function module 'SD_SALESDOCUMENT_CREATE' to create a credit memo request, and I could able to create test data but I am not successfull as SOLD-TO-PARTY is missing in the inputs at header level.

Can any one please advice me where to provide SOLD-TO-PARTY at header level in the above said function module..?

It is too urgent, please help me.

Helpfull answers are rewarded.

Thanks and regards,

Veerendranath Maddula.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
732

You have to pass the sold to and ship to in the parameter SALES_PARTNERS..

You can also use the BAPI 'BAPI_SALESDOCU_CREATEFROMDATA1'

CHeck this link for a sample code

https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-Simpleprogramtocreatesalesorderusing+BAPI

dont forget to maintain Partner role otherwise it will give error.

I am using function module 'SD_SALESDOCUMENT_CREATE' to create a credit memo request, and I could able to create test data but I am not successfull as SOLD-TO-PARTY is missing in the inputs at header level.

Can any one please advice me where to provide SOLD-TO-PARTY at header level in the above said function module..?

It is too urgent, please help me.

Helpfull answers are rewarded.

Thanks and regards,

Veerendranath Maddula.

3 REPLIES 3
Read only

Former Member
0 Likes
733

You have to pass the sold to and ship to in the parameter SALES_PARTNERS..

You can also use the BAPI 'BAPI_SALESDOCU_CREATEFROMDATA1'

CHeck this link for a sample code

https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-Simpleprogramtocreatesalesorderusing+BAPI

dont forget to maintain Partner role otherwise it will give error.

Read only

Former Member
0 Likes
732

Hi,

BAPIPARNR-PARTN_NUMB

in tables "sales_partners"

Regards

Nicole

Read only

Former Member
0 Likes
732

Hi,

You can also use function SD_SALESDOCUMENT_CREATE. I remember we created an interface and gave values for parameter business_object accordingly:

...

gc_vbtyp_credit_req TYPE vbtyp VALUE 'K', "--> INCL RVVBTYP

gc_vbtyp_debit_req TYPE vbtyp VALUE 'L', "--> INCL RVVBTYP

gc_vbtyp_invoice TYPE vbtyp VALUE 'M', "--> INCL RVVBTYP

gc_vbtyp_order TYPE vbtyp VALUE 'C', "--> INCL RVVBTYP

gc_vbtyp_return TYPE vbtyp VALUE 'H'. "--> INCL RVVBTYP

...

case lv_vbtyp.

when gc_vbtyp_order.

lv_oj_name = 'BUS2032'.

when gc_vbtyp_return.

lv_oj_name = 'BUS2102'.

when gc_vbtyp_credit_req.

lv_oj_name = 'BUS2094'.

when gc_vbtyp_debit_req.

lv_oj_name = 'BUS2096'.

when others.

  • no good

endcase." lv_vbtyp.

Check with below link :

Regards,