on 10-09-2011 7:47 AM
Hi Gurus,
I use LSMW for sales order creation and the feild which I have taken are only doc type, sales area, customer no and material no. Rest all data like plant,price etc etc gets determined from the master data maintained and is automatically populated in the order.
My question is that if we use BAPI than does the data gets determined in the sales order or what ever we enter in BAPI will only get populated in the order. Since LSMW is just like running transaction so data gets populated from the masters maintained also, but if we use BAPI so will the data get determined.\
Komal
Hi Komal,
Since LSMW is just like running transaction so data gets populated from the masters maintained also, but if we use BAPI so will the data get determined
Yes some fields will be populates when you go with bapi .Like plant,shipping point and all.
Regards,
Madhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If your material is holding the details of the Delivery Plant "( in Sales Org 1 view of material master ) ,then the plant will be picked up from this. if not if there is no condition set to the field of plant on the Sales order , then the same will remain blank.
-avs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Komal,
CreateFromDat1 is from version 4.0 -> 4.6C and obsolete.
CreateFromData is from version 4.5A and obsolete.
CreateFromDat2 is from version 46A to above.
In the customer master data you can set the delivery site (plant)
or set that in material master data. This depends on your configuration.
I have always set the plant in the bapi so I do not know if it is possible to leave
empty.
If you have access to SAP, you can test this.
Goto to SE37, enter the FM name BAPI_SALESORDER_CREATEFROMDAT2
and from menu Function Module -> Test -> Single Test
Here you can test what fields you need to set. Also if you want to do commit also,
use the "Test Sequence" instead of "Single test". And set both functions:
BAPI_SALESORDER_CREATEFROMDAT2
BAPI_TRANSACTION_COMMIT
P.S. I read your question again and since the plant is not mandatory, you can leave it empty if you configure the plant settings elsewhere and it should get the plant from configuration. I bet you are using the same FM in the LSMW code too.
Br, mika
Edited by: M.Karvonen on Oct 9, 2011 12:01 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Mandatory fields in BAPI_SALESORDER_CREATEFROMDAT2:
ORDER_HEADER_IN :
DOC_TYPE (Sales document type)
SALES_ORG (Sales organization)
DISTR_CHAN (Distribution channel)
DIVISION (Division)
ORDER_PARTNERS..:
PARTN_ROLE (Partner role, SP sold-to party)
PARTN_NUMB (Customer number)
If no ship-to party is entered, use the following: Ship-to party = sold-to party.
ORDER_ITEMS_IN..:
MATERIAL (Material number)
(number of goods?)
Also I'm not sure if you need to do bapi database commit since documentation says this is not included.
So if the bapi call is ok, you might need to call BAPI_TRANSACTION_COMMIT also.
German key words:
The following key words must be entered in German, independantly of the logon language: DOC_TYPE Sales document type, for example: TA for standard order, PARTN_ROLE Partner role, for example: WE for ship-to party or AG = Sold-to-Party.
The note 93091 contains general information on the BAPIs in SD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the above mentioned feilds, plant is not mandatory, so my question is that, will the plant get determined automatcially like it does in entering trasnsaction manually( provided if the determination is maintained)
Also, please tell me about the difference in
BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
Thanks a lot for your early response.
Komal
User | Count |
---|---|
94 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.