04-27-2011 11:31 AM
My requirement is also similar to yours which you faced. In my case its a 'DropShip order' Type which involves both the Sales Order Creation and Purchase Requisition creation as well.
After entering all the Line Items in VA01 then for LineItems -> ScheduleLine -> 'Purchase Requisition'(PushButton). Here i enter 4 fields like
1. Requisitioner/Requister
2. Tracking Number
3. Value Price
4. Desired Vendor
http://These 4 field enrties will be reflecting in ME51N and in the VA01(DropShip Order).
And then save the document which created Sales Order + Purchase Requisition.
I am using BAPI called 'bapi_salesorder_createfromdat2' to create sales order and the above 4 fields are not available in this BAPI which creates Sales Order.
The fields i am using for Sales Order:
Sales Document Type
Sales Organisation
Distribution Channel
Division
Sold to Party,P.O.Number,
P.O.Date,
Req. Delivery Date,
Payment Terms,
Inco Terms,
Inco Terms(Part2),
HeaderCnType(01),
Amount(01),
Line Item No.
Material Code
Material Description
Order Quantity
Item Category
Plant
WBS Element
ItemCnTy(01)
Base Price
ItemCnTy(02)
And the fields which we are entering for purchase requisition in VA01 are
Requisitioner
Tracking Number
Value Price
Desired Vendor
I need some help in which a ''BAPI" should update these 4 fields in VA01 and it should create Purchase requisition.
You already faced this kind of issue infact a similar one and i can see from the SDN you already got some solution
for this Issue.
Please let me know which BAPI i should use for this DropShip Order Type Which creates the 'Sales Order' and 'Purchase Requisition' at the same time. Or else is there any other methods to follows to achieve this requirement.
09-27-2011 10:47 AM
09-27-2011 11:48 AM
Solved the issue.
You have to make the changes in user-exit MV45AFZB
FORM USEREXIT_MOVE_FIELD_TO_ME_REQ.
* Example
* EBAN-LIFNR = zzfield1.
* EBKN-KOSTL = zzfield2.
ENDFORM