Characteristics for Item of a Order in BAPI
Hi,
My requirement is to create a return sales order using a BAPI from a inbound file for AFS Material.
I am using BAPI BAPI_CUSTOMERRETURN_CREATE which has interface almost same as any other Sales Order creation BAPI.
When a AFS material data is entered in the sales order creation Transaction (VA01) we have option for Matrix Entry.
In my current system,
certain materials are configured to have characteristics XS, S, M.
Some MAterials have charectricits XS, SM, MD, LG, XL.
eg :
WE craete a BAPI with 2 items one with the first material and second with the second material.
We enter first material XS = 1, and M = 1 and thus total quantity in the first item = 2.
We enter Second material XS = 1, SM = 1, LG = 1, XL = 1 and thus total quantity in the first item = 4.
Coming back to my requirement I need to pass the above characteristics values into teh BAPI when I create a sales order so that the sales order thus created has items with the characteristics as mentioend above.
CAN ANYONE PLEASE HELP ME IN ACHIEVING THIS. "CREATE SALES ORDER WITH CHARACTERISTICS VALUES FOR ITEMS (QUANTITY) USING BAPI".
Hi,
My requirement is to create a return sales order using a BAPI from a inbound file for AFS Material.
I am using BAPI BAPI_CUSTOMERRETURN_CREATE which has interface almost same as any other Sales Order creation BAPI.
When a AFS material data is entered in the sales order creation Transaction (VA01) we have option for Matrix Entry.
In my current system,
certain materials are configured to have characteristics XS, S, M.
Some MAterials have charectricits XS, SM, MD, LG, XL.
eg :
WE craete a BAPI with 2 items one with the first material and second with the second material.
We enter first material XS = 1, and M = 1 and thus total quantity in the first item = 2.
We enter Second material XS = 1, SM = 1, LG = 1, XL = 1 and thus total quantity in the first item = 4.
Coming back to my requirement I need to pass the above characteristics values into teh BAPI when I create a sales order so that the sales order thus created has items with the characteristics as mentioend above.
CAN ANYONE PLEASE HELP ME IN ACHIEVING THIS. "CREATE SALES ORDER WITH CHARACTERISTICS VALUES FOR ITEMS (QUANTITY) USING BAPI".
Similar Messages
-
How to identify Sale Order costing is required for Items in Sales Order
Howstandard cos estimate*w to identify Sale Order costing is required for Items in Sales Order?
On which criteria we can conclude Sale Order Costing is reqd ?
? * means what and wat is the purpose and how to chk for the Item in Sales Order, either it is required or not**.Hi Dharamveer,
The best way is to make the order qty is equal to the quantity delivered. This way, when some one looks at this order in future - they think that the order was for X and the delivery was for X qty is completed. They will not know the background of the issue unless they go through change log. Even in change log, they see that the Ord qty was adjusted, but may not understand why?
The good practice is to make order qty equal to already delivered qty.
Create a new line for the remaining qty and reject the same with appropriate reason for rejection. This way, any one can understand the background , the reason for rejection easily. Hope it helps ! -
Restriction for items from Purchase Order based on Sale Order
Hi !
We create PO directly from Sale Order ( by ticking Option under Logistic tab, 'Purchase Order') for customer C01 (for eg).
From the PO created, we post GRPO.
Now our need is,
Assume if 10 Qty is been ordered in such a way and been received (GRPO posted). it 'll add on to the stock account i.e will increase stock qty at our whse.
is it possible to restrict these 10 qty of item from being sold to any other Customer other than whom hav ordered i.e if we create sale order for C02 the SBO should not take the items received from PO created based on Sales Order created for C01?
Meera.Meera,
Which version of SBO are you using 2005 or 2007?
I don't think Serial numbers can help in this scenario. There is no hard allocation or blocking possible using Serial numbers.
This is the Work around I am thinking about.
Set the items to be Batch Managed - On Every Transaction
When performing Goods Receipt, enter the Sales Order Number as the Batch Number
When creating the delivery, using SBO_SP_TransactionNotification we can easily check the Batch of the Item being selected and verify it with the BaseRef of Delivery lines to match with Sales Order number.
If the numbers don't match we can warn user with message, "The items batch reserved for Sales Order xyz"
Even if you make a mistake when entering the batch number same as Sales Order number when doing a goods receipt. It can still be traced and blocked during delivery.
Hint: The Batch table records the Goods Receipt transaction along with the BaseDocument number, Base Ref, etc
If you decide to go this route, I could help you further.
Let me know
Suda -
Confirmed Quantity for Item in sales order
Dear All,
In one sales order there is confirmation block (this is through the delivery block in the sales order header level).
The sales order contains BOM (header and it's sub items) and some standard items also two third party items.
When the sales order is saved there are no confirmed quantity for any of the item except the BOM header.
May I know what could be the reason to have this BOM header confirmed quantity..??? this is leading to a problem in the data from sales order.
Is there any customizing related to this item (item category or schedule line category) to look out for..??
Thanks & Regards,
Vishi...hello, friend.
your issue is quite broad. outcome depends on -
1. configuration of delivery block (which, in your case, we can assume to include confirmation block)
2. selection of availability check and MRP type in material master
3. schedule line category and schedule line determination
now in standard, if the order line item category is TAN, and MRP type is PD and availability check is PD... the system might temporarily confirm the item even when putting a delivery block at header level, but the system should delete confirmed quantities when you save the order. you can check the confirmed quantities when you open the sales order in change mode... the confirmation should be zero.
however, in third party items (item category TAS), these items are normally confirmed even in change mode. this may hold true if either MRP = none (e.g. ND) and/or if availability check is KP (no check).
nevertheless, regardless of confirmation quantity, the system should not allow creating of delivery while delivery block is in place.
please try these scenarios and post your feedback.
regards.
jy -
i copied the program to create s.order from wiki,
works fine.
noew i need to add this
item-hg_lv_item = p_uepos.
itemx-hg_lv_item = 'X'.
and i get err why??
pls.Hi Stephanie,
Check this following link for creation of sales order using bapi:
http://www.sap-img.com/fu036.htm
Have a look at these links also:
http://abaplovers.blogspot.com/2008/02/bap-sales-order-create.html
http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
Hope this helps you.
Regards,
Chandra Sekhar -
Sales order change BAPI not updating items Profit center
Dear ,
I am facing the problem in using the BAPI for Item 's profit centre in blank space.
I write down the below code <but it's not at all updating the profite centre .
please ccorrect the code if any required'
TYPES: BEGIN OF file_data ,
vbeln TYPE vbap-vbeln, " order numner
posnr TYPE vbap-posnr, " orderitem
profit_ctr TYPE vbap-prctr, " [profite centre
END OF file_data.
DATA: t_data TYPE STANDARD TABLE OF file_data .
DATA : wa_data LIKE LINE OF t_data.
DATA: t_data_item TYPE STANDARD TABLE OF file_data .
DATA : wa_data_item LIKE LINE OF t_data_item.
**DATA: t_data_item TYPE file_data OCCURS 0.
*DATA: return TYPE STANDARD TABLE OF bapiret2.
*DATA: wa_return LIKE LINE OF return.
DATA: wait LIKE bapita-wait VALUE 'X'.
DATA: s_order_header_in LIKE bapisdh1.
DATA: s_order_header_inx LIKE bapisdh1x.
DATA: BEGIN OF i_order_item_in OCCURS 0.
INCLUDE STRUCTURE bapisditm.
DATA: END OF i_order_item_in.
DATA: BEGIN OF i_order_item_inx OCCURS 0.
INCLUDE STRUCTURE bapisditmx.
DATA: END OF i_order_item_inx.
DATA: BEGIN OF it_return OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF it_return.
***********************selection
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS : file LIKE rlgrap-filename OBLIGATORY.
"ctu_mode TYPE ctu_mode DEFAULT 'N'.
SELECTION-SCREEN END OF BLOCK b1.
*********assign file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
CLEAR file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = file
EXCEPTIONS
OTHERS = 1.
DATA: it_text TYPE truxs_t_text_data .
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
i_field_seperator = 'X'
i_line_header = 'X'
i_tab_raw_data = it_text
i_filename = file
TABLES
i_tab_converted_data = t_data[] " Your internal table of structure of Excel sheet
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
t_data_item[] = t_data[].
DELETE ADJACENT DUPLICATES FROM t_data COMPARING vbeln.
Header update indicator
s_order_header_inx-updateflag = 'U'.
Line items
REFRESH: i_order_item_in, i_order_item_inx.
LOOP AT t_data INTO wa_data.
LOOP AT t_data_item INTO wa_data_item WHERE vbeln = wa_data-vbeln. .
i_order_item_in-itm_number = wa_data_item-posnr.
i_order_item_in-profit_ctr = wa_data_item-profit_ctr.
i_order_item_inx-itm_number = wa_data_item-posnr.
i_order_item_inx-updateflag = 'U'.
i_order_item_inx-profit_ctr = 'X'.
APPEND: i_order_item_in, i_order_item_inx.
ENDLOOP.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_data-vbeln
IMPORTING
output = wa_data-vbeln.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = wa_data-vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx.i already used same But it's not working
s_order_header_inx-updateflag = 'U'.
Line items
REFRESH: i_order_item_in, i_order_item_inx.
LOOP AT t_data INTO wa_data.
LOOP AT t_data_item INTO wa_data_item WHERE vbeln = wa_data-vbeln. .
BAPISDITM
i_order_item_in-itm_number = wa_data_item-posnr.
i_order_item_in-profit_ctr = wa_data_item-profit_ctr.
BAPISDITMX
i_order_item_inx-itm_number = wa_data_item-posnr.
i_order_item_inx-updateflag = 'U'.
i_order_item_inx-profit_ctr = 'X'.
APPEND: i_order_item_in, i_order_item_inx.
ENDLOOP.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_data-vbeln
IMPORTING
output = wa_data-vbeln.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = wa_data-vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx. -
Creating Billing Plan data for sales order using BAPI
Hello,
Someone ones if there is any way to create a sales order (BAPI) and then create a billing plan (by means of another BAPI)?
Or is there any way to create both at the same time?
Kind Regards.Hi David and Nisha here is the code for creating sales order with bapi
*& Report YOBJ_BAPI_SALESORDER
*& REPORT : CREATING SALES ORDER USING STANDARD BAPI
*& AUTHOR : S.PAVAN KUMAR INUMARTHY
REPORT YOBJ_BAPI_SALESORDER.
DATA : ORDER_HEADER_IN LIKE STANDARD TABLE OF BAPISDHD1 WITH HEADER LINE.
DATA : ORDER_ITEMS_IN LIKE STANDARD TABLE OF BAPISDITM WITH HEADER LINE.
DATA : ORDER_PARTNERS LIKE STANDARD TABLE OF BAPIPARNR WITH HEADER LINE.
DATA : RETURN TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
*APPENDING VALUES FOR HEADER.
ORDER_HEADER_IN-DOC_TYPE = 'TA'.
ORDER_HEADER_IN-SALES_ORG = '1000'.
ORDER_HEADER_IN-DISTR_CHAN = '10'.
ORDER_HEADER_IN-DIVISION = '00'.
ORDER_HEADER_IN-SALES_GRP = '130'.
ORDER_HEADER_IN-SALES_OFF = '1030'.
APPEND ORDER_HEADER_IN.
*APPENDING VALUES FOR ITEM
ORDER_ITEMS_IN-MATERIAL = 'M-13'.
ORDER_ITEMS_IN-PLANT = '1000'.
ORDER_ITEMS_IN-SALES_UNIT = 'ST'.
ORDER_ITEMS_IN-DIVISION = '07'.
ORDER_ITEMS_IN-GROSS_WGHT = '28000'.
ORDER_ITEMS_IN-NET_WEIGHT = '28000'.
ORDER_ITEMS_IN-UNTOF_WGHT = 'KG'.
ORDER_ITEMS_IN-VOLUME = '0.780'.
ORDER_ITEMS_IN-VOLUNIT = 'M3'.
APPEND ORDER_ITEMS_IN.
*APPENDING VALUES FOR PARTNER
ORDER_PARTNERS-PARTN_ROLE = 'AG'.
ORDER_PARTNERS-PARTN_NUMB = '0000001000'.
ORDER_PARTNERS-COUNTRY = 'DE'.
ORDER_PARTNERS-TRANSPZONE = 'D000080000'.
APPEND ORDER_PARTNERS.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
* SALESDOCUMENTIN =
ORDER_HEADER_IN = ORDER_HEADER_IN
* ORDER_HEADER_INX =
* SENDER =
* BINARY_RELATIONSHIPTYPE =
* INT_NUMBER_ASSIGNMENT =
* BEHAVE_WHEN_ERROR =
* LOGIC_SWITCH =
* TESTRUN =
* CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
ORDER_ITEMS_IN = ORDER_ITEMS_IN
* ORDER_ITEMS_INX =
ORDER_PARTNERS = ORDER_PARTNERS
* ORDER_SCHEDULES_IN =
* ORDER_SCHEDULES_INX =
* ORDER_CONDITIONS_IN =
* ORDER_CONDITIONS_INX =
* ORDER_CFGS_REF =
* ORDER_CFGS_INST =
* ORDER_CFGS_PART_OF =
* ORDER_CFGS_VALUE =
* ORDER_CFGS_BLOB =
* ORDER_CFGS_VK =
* ORDER_CFGS_REFINST =
* ORDER_CCARD =
* ORDER_TEXT =
* ORDER_KEYS =
* EXTENSIONIN =
* PARTNERADDRESSES =
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
* IMPORTING
* RETURN =
ENDIF.
WRITE : 'SALES ORDER IS :', SALESDOCUMENT.
I have tested and go it.
please go through it -
Sales Order Change BAPI - Reason for Rejection
Hi,
I want to update reason for rejection field for a particular sales order at item level. When I am executing the BAPI "BAPI_SALESORDER_CHANGE", I am getting the error "Field header_inx-updateflag is not an input field". I did not check this field as I'm not making any change in the header part.
Please help me in resolving this issue. Let me know if I have to provide any other information.
regards,
ravikiran.Found BAPI myself...... BAPI_SALESORDER_CHANGE
-
Report for deleted line-items in Transfer Orders
Dear All,
Please help me in writing the code for "Report for deleted line-items in Transfer Orders".
regards,
nishuThanks. Repor completed.
-
Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI
I am having a problem when creating a sale order using BAPI
BAPI_SALESORDER_CREATEFROMDAT2
Problem is that sale order item quantity field is not populating
code is as follows
ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
ORDER_ITEMS_IN-TARGET_QU = 'LB'.
ORDER_ITEMS_IN-TARGET_QTY = 1.Hi,
Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
Regds,
Rudra -
BAPI_SALESORDER_CHANGE to update reason for rejection of sales order item
Hi,
The FM BAPI_SALESORDER_CHANGE is not working properly as I am getting below error when try to update the reason for rejection at sales order item level.
The delivery is done for this salesorder. Is it because the reason for rejection field is not as an input field when delivery done?
error in return table is " Field 'ABGRU' cannot be changed, VBAPKOM 000010 ready for input"
Request your suggestions to avoid this error.
Thanks>
anikaushi wrote:
> Hi,
> The delivery is done for this salesorder. Is it because the reason for rejection field is not as an input field when delivery done?
>
> error in return table is " Field 'ABGRU' cannot be changed, VBAPKOM 000010 ready for input"
>
>
> Thanks
Yes, Most likely.. You can confirm this by trying to change a order without delivery and see if it goes thru (to ensure that you have passed correct parameters)...
you may have to delete the delivery (and if billing document exist, cancel it), before you can reject the line item... it would be safer to raise an error message and let the users manually delete delivery document as long as you don't have large volumes of this scenario..
Please see the SDN thread for how you can avoid this error...
Re: Cancel Sale Order after Issued Billing -
Error-M2O-Settlement rule for assembly order for item...could not be genera
Hi,
When I am creating Sales Order (VA01) for M2O, I am able to do the costing and copy the EK02 condition type. I have verified the the incompletion log, it indicates that document is complete.
But while saving the sales order, the below error message is displaed:
Settlement rule for assembly order for item 000010 could not be generated. Should the order still be saved?
Yes/No
1. If No is choosen the following error message is displayed
Error when processing Production order
Error when processing Production order
Message no. V1380
Diagnosis
A technical error has occurred. On calling up the assembly interface, exception 5 was triggered. The exceptions have the following meanings:
1 = External block, 2 = General error, 3 = Insufficient data for the interface, 4 = Order was not found, 5 = Update has been rejected, 6 = Final document number for Production order is not issued. Procedure: Inform your system administrator.
2. If Yes is choosen, it is creating Production Order without settlement rule. Able to perform GI & Gr. If I try to enter settelement rule (Settlement receiver SDI - Sales document item) in production order (CO02), the belwo error message is displayed
"Distribution rule for Sales document item can only be created automatically Message no. KD063"
We are using the requierement class with below details:
Reqmts class: ZSO- for M2O
AAC = E, Valuation = A, Settlement profile =SD1, RAKey = 000004, Assembly type = 3.
Settlement profile contain:
Allocation structure, PA structure, Default object type = SDI. Valid receivers: Optional -Sales Order / Prof. seg.
If I make the Valuation field as blank in Reqmts class, there is no error while creating Sales order. And also Settelemnt rule with sales document item as receiver is successfully creating for the production order. Since the Valuation is blank in requirement class, it is Non valuated Sales order stock. All GIs & GR are non valuated
The business requirement is it should be valuated sales order stock and the production varinaces has to be settled to Sales order. Then Sales order has to be settled to COPA.
Need your valuable inputs to meet this requirement.
Let me know if you need any further details.
Thanks in advance.
Regards,
ADIDear SAP PP Consultant ,
What is the strategy group you are maintained in the material master ? -
BAPI for Creating a PM order(iw34) with reference to a Notification
Hi All,
Could anyone help to find the BAPI for creating a PM order with reference to a notification Number.
I will explain my requirement :
I want to create a notification from an external Application where i got the BAPI BAPI_ALM_NOTIF_CREATE and keeping this created notification number as Referece or for this notification number i need a create a PM order.Usually this process in done transaction IW34 in R/3.
But with the BAPI BAPI_ALM_ORDER_MAINTAIN i can create a PM order but this BAPI doesn't have a input parameter "Notification number ".So i can't use this BAPI.
Could any suggest for a BAPI where i can create a PM order with reference to a Notification Number.
Regards,
SidHi,
I have tried with the FM CO_IH_ORDER_GENER_2 but when i executes it gives a error message
"<i>Service/maintenance order type PM02 not completely maintained in plant
Message no. IW216
Diagnosis
For the selected order type and plant, no check control is maintained in Plant Maintenance/Service in 'Availability Check for Materials, PRTs and Capacities'.
Procedure
A check control must be maintained for this combination of order type and plant</i>"".
And even have a doubt what to enter in this input parameter "GEWRK_OBJTYP" .
Kindly help me to solve this issue.
Regards,
Sid -
Credit Check while creation of Sales Order for Item Category Purchase Req
Hi Experts,
We are creating Sales Order using an Order Type ABCD for a material 1000. While creating Sales Order, we use Item categories (ZOVD, ZOVB,ZOST,ZOVP and ZOBO).
Credit Check settings are there at Order Type ABCD as well as all the Item Categories (ZOVD, ZOVB,ZOST,ZOVP and ZOBO). We are trying to test a scenario where a customer does not have enough credit limit while creating a sales order.
When we create a sales order for Item Categories (ZOVD, ZOVB,ZOST,ZOVP), credit check fails because our customer does not have enough credit limit, so that Sales Order gets created and Delivery does not get created (This is what we want), then we go into VKM1 manually and relase the sales order and then if we go to VA02 and check the status of the Sales Order, it says sales order status is complete. My Sales Team is saying here also Purchase Requisition is getting created.
When we create a sales order for Item category ZOBO, it is going into Purchase Requisition screen. Once we give another plant in the create purchase requisition screen and save it we are getting a message that cannot create Purchase Requisiton because of Credit Block.
The settings were same for all the Item categories.
1) What made difference to complete Purchase Requisition for Item Categories (ZOVD, ZOVB,ZOST,ZOVP) and not for Item Category ZOBO when my customer is not having enough credit Limit.
2) Why Purchase Requisition screen is not coming for us when we create an Sales Order for Item Categories (ZOVD, ZOVB,ZOST,ZOVP). We only get Create Purchase Requisiton Screen for Item Category ZOBO.
Thanks
RajanikanthHi,
None of the Item Categories has Create PO Automatically.
Thanks
Rajanikanth -
Pricing For Text Item in Sales Order
Hi ,
How to give price for text item in sales order.
With regards.
AfzalHi Afzal,
consider to create a single service material as a generic one, type DIEN, with basic data and sales org views, with item category group LEIS (it will determine item category TAX in sales order). Material description could be "Don't forget to change me!" so in sales order user remembers to changes the description according to the especific sales order requirements.
Regards,
JM
Maybe you are looking for
-
hi friends i want to print some content in korean language. i should select font and type of font at the time of printing. I don't have any idea .Please help me thanks in advance
-
Where are the updates located for Mac App Store app?
Hi, where are the updates located for Mac App Store app? I don't think /Library/Updates is the only location. Because I'm now having 10+ of Apps reporting updates is needed, but only 1MB+ files is located in /Library/Updates. Please help!
-
Spam is hanging in phase IMPORT_PROPER
Hi! I am facing with hanging SPAM error in phase IMPORT_PROPER (patch of SAPKB70013 - SAPKB70016). The SPAM patch terminates after a few sec. in DDIC activation action. I have looked into log file and founded folllowing: The job RDDEXECL terminated w
-
Query Regarding the Oracle PL/SQL Developer OCA
Hi All I am planning to go for the certification "Oracle PL/SQL Developer OCA " But I am not sure what is value of this certification in market. Please help me out. Thanks in advance Amit
-
Hi SAP gurus I want to close the Project while closing i am getting error that purchase requisition commitment exists for the WBS . PR's created from the project builder and these purchase requistion are unwanted. Tried by deleting the components / l