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

sales order bapi using lsmw

Former Member
0 Likes
696

Hi,

in LSMW i am using BAPI:SALESORDER_CREATEFROMDAT2

and in the mapping, i have assigned : E1BPPARNR-PARTN_ROLE = 'SP'.

E1BPPARNR-PARTN_NUMB = '1000005'.

E1BPPARNR-ITM_NUMBER = '000000'

I am getting an error:

<b>Please enter sold-to party or ship-to party.</b>

Any ideas?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

Hi,

Please use FM CONVERSION_EXIT_ALPHA_INPUT to do the customer number conversion.

The customer number is stored '0001005000' in the database.


...
DATA: WA_KUNAG LIKE KNA1-KUNNR.

WA_KUNAG = '1005000'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    INPUT =  WA_KUNAG
  IMPORTING
    OUTPUT = WA_KUNAG.

E1BPPARNR-PARTN_NUMB = WA_KUNAG. 
E1BPPARNR-PARTN_ROLE = 'AG'.
E1BPPARNR-ITM_NUMBER = '000000'.

...

Regards,

Ferry Lianto

Hi,

in LSMW i am using BAPI:SALESORDER_CREATEFROMDAT2

and in the mapping, i have assigned : E1BPPARNR-PARTN_ROLE = 'SP'.

E1BPPARNR-PARTN_NUMB = '1000005'.

E1BPPARNR-ITM_NUMBER = '000000'

I am getting an error:

<b>Please enter sold-to party or ship-to party.</b>

Any ideas?

4 REPLIES 4
Read only

Former Member
0 Likes
635

Hi,

Please try this.


E1BPPARNR-PARTN_ROLE = 'AG'.        <--- Sold-to customer

or

E1BPPARNR-PARTN_ROLE = 'WE'.        <--- Ship-to customer

Regards,

Ferry Lianto

Read only

0 Likes
635

Hi Ferry,

When I was using 'AG', I am getting an error:

No customer master record exists for customer 1005000

Read only

Former Member
0 Likes
636

Hi,

Please use FM CONVERSION_EXIT_ALPHA_INPUT to do the customer number conversion.

The customer number is stored '0001005000' in the database.


...
DATA: WA_KUNAG LIKE KNA1-KUNNR.

WA_KUNAG = '1005000'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
  EXPORTING
    INPUT =  WA_KUNAG
  IMPORTING
    OUTPUT = WA_KUNAG.

E1BPPARNR-PARTN_NUMB = WA_KUNAG. 
E1BPPARNR-PARTN_ROLE = 'AG'.
E1BPPARNR-ITM_NUMBER = '000000'.

...

Regards,

Ferry Lianto

Read only

0 Likes
635

Thank you Ferry. It worked. I awarded the points.