Multiple Selection of Products in Sales Order
Hi Experts,
my requirement is to select mulitiple products from the product F4 help pop-up in sales order items assignment block. To achieve this I have made the following settings:
1.added the following code in SearchHelpResult.htm view layout of PRD01QR/SearchHelpResult.
onRowSelection = "<%= lv_select_event %>"
selectionMode = "<%= RESULT->SELMODE_MULTI %>"
selectedRowIndex = "<%= RESULT->SELECTED_INDEX %>"
selectedRowIndexTable = "<%= RESULT->SELECTION_TAB %>"
after this settings, I am able to select multiple products.
2.I have created a button (Choose) for the component PRD01QR to transfer the products to the items assignment block.
please suggest me on how to transfer the multiple products from the Pop-up to the items assignment block (BT115IT_SLSO)and create line items using the events.
thanks and regards,
S Reddy
Hi,
Redefine the method EH_ONSELECT_ORDERED_PROD.
As you can see, they are getting the current entity,reading the Product GUID and setting it.
Here is sample code snippet...
DATA: lr_context_node TYPE REF TO cl_bsp_wd_context_node,
lr_cw TYPE REF TO cl_bsp_wd_collection_wrapper,
lr_it TYPE REF TO if_bol_bo_col_iterator,
lr_current TYPE REF TO if_bol_bo_property_access,
lr_prd TYPE REF TO if_bol_bo_property_access,
lr_product_guid TYPE REF TO comt_product_guid,
lv_outbound_plug TYPE seocmpname,
lv_index type sy-index.
TRY.
Check outbound plug
lv_outbound_plug = prodsearch_popup->get_fired_outbound_plug( ).
CHECK lv_outbound_plug = 'RETURNRESULT'.
lr_context_node = prodsearch_popup->get_context_node( iv_cnode_name = 'PRD' ).
lr_current = lr_context_node->collection_wrapper->get_first( ).
while lr_current is bound.
set product guid
lr_product_guid ?= lr_current->get_property( iv_attr_name = 'PRODUCT_GUID' ).
lr_cw = get_collection_wrapper( gc_context_node_admini ).
lr_it = lr_cw->get_iterator( ).
lv_index = lv_index + 1.
lr_prd = lr_it->get_by_index( iv_index = lv_index ).
lr_prd->set_property( iv_attr_name = 'PRODUCT' iv_value = lr_product_guid->* ).
lr_current = lr_context_node->collection_wrapper->get_next( ).
CATCH cx_sy_ref_is_initial cx_sy_move_cast_error.
RETURN.
ENDTRY.
Basically you have to loop at the products and populate admini.
Regards,
Masood Imrani S.
Similar Messages
-
Make a multiple selection of material in sale order
In sale order, currently it supports only one line item selection of material in Approved product selection. How to make multiple line item selection from Approved product selection screen and add it it to sales order (order entry screen).
Hi,
For Item proposal you have to use sales doc type PV and it has to use in transaction VA51. Enter the materials you want and give some description at header and save it , After saving it will generate a number . Note the number and enter the number in customer master data ,sales area data in sales tab page for the field Item proposal. Then rise the sales order on the top of menu click the Icon item proposal , Here you have to select the items with or without quantities.
Thank you,
pranay -
Not able to select Base unit in Receipt from production and Sales order
Can anybody help me out for the below scenario
I have defined Sales UOM , Sales Packaging UOM, Items per Sales unit and Quantity per Packing UOM for all finished product in the item master.
I have created Production BOM and Production Order (with Issue method is Manual because they maintained items batchwise ) for all Finished products.
Based on Production orders, I received finished products(Batch wise) through receipt from production. But the base unit shows Yes and it is not allow me to change.
In Sales order, the quantity column shows the value of quantity per packing UOM instead of Items per sales unit.
For Ex. ItemA - 01 No (Item per Sales Unit)
3600 Pcs ( Quantity per Packing UOM)
Receipt from Production - 10 Nos
In Sales order - it shows 36000 (10*3600 ) instead of 10 nos
Expecting favourable solution for that.The selectable units on the sales order are the inventory unit or the sales unit. So if you want to see in units of 3600 Pc-s you should define this as Sales Unit (not as packaging unit). Then you can show the item in this unit in the sales documents.
(In the receipt from production document you should always use the inventory Uom.)
Edited by: István K#rös on Dec 22, 2009 10:07 AM -
FG production on sales order but RM procurement on Sales Contract.
Dear Gurus
Here is the client requirement for Planning and Procurements of FGS and Rms.( Process Industry)
1) Client wants to make sales Contract VA41 for FG in which they will create schedule line for item with delivery date in Month format with Quantity.
From VA41 sales contract creation , they want their RMS to be Procured but NO MRP should be run or impacted for Final Assembly. In short NO MRP for FG
2) After VA41, they again want to run VA41 in which they will create ''With reference and in contract tab, they will make Customer PO with reference to above Contract. This number will give them a Qty Variance between customer's purchase order and the sales documents created.
3) Again with Reference of Customer PO, they will make a Sales order from VA41 and this sales order they will Produce their FG.
So FG Production is Sales order driven but RM procurement is Sales Contract driven.
1) Which Planning strategy i should assign to RM and FG?
2) What will be step by step configuration guide from PP and SD side.?
Appreciate your reply
Thanks
ShaileshIn SPRO
goto SD>Schedule line>Define schedule line categories
here check if the schedule line category associated with your mentioned order has a flag ticked for Availability.
Availability check for sales
You must carry out an availability check for the following transaction.
The indicator is determined as a proposal in conjunction with the respective requirements type. It can be changed in individual shipping transactions. However, only one restriction is effective.
Example
You do not set an indicator for maintaining the requirements type. In this case, no availability check is carried out. This is independent of the selection in the respective transaction.
You set an indicator for maintaining the requirements type. In this case you can decide whether or not you require an availability check for the relevant transaction.
reward points if it helps
regards
Biju -
Select query help for Sales order
Hi Experts,
I have to write a select query to fetch sales orders which are open along with the quantities which are open ( not delivered). What would the best approach for this?
Any help is appreciated. Expecting code samples....Thanks
Thanks
Rickyhi,
do like this,
write a select query for vbak and vbuk as follows.
delivery status field is <b>lfstk</b> from <b>vbuk</b>,
and relation field is <b>vbeln</b> from the both the tables.
reward points if useful,
regards,
seshu. -
Method to be used to delete a particular select parameter in a Sales order
Hi ,
Which Method can be used to delete a particular select parameter in a Sales order search screen using class CL_CRM_BOL_DQUERY_SERVICEHi,
Okie :) please feel free to post any problem :)
Please apply the patch that has the fix for this issue:
[Patch 9791839|https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=9791839]
The above link worked fine for me .
Ideally, you should pick up the latest patch, which is [ Patch 11846804|https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=11846804]
Click on View Read me for install instructions. Let me know if you find any problem with patch install.
Regards,
Ajay Kumar -
Production against sales order
Hi all experts,
I am creating a report for Linewise width wise handover
summary(OK production against sales order)
I am taking Date from MKPF and QTY from MSEG
I need to show Work Center [ CRHD-ARBPL ]
but dont know how to link tables
can any one send me the code and link btween MSEG and
CRHD or any other table which having ARBPL field linking with
MSEG.
Thanx in Advance ......Hi,
CAUFV and AFKO tables are linked with table CRHD. These two tables are related to order. You can try these tables to get the desired data.
Regards
Amit parkhi -
Multiple deliveries from a single sales order
Hi all,
Can any body explain how to Configure the process to create multiple deliveries for one sales order and one invoice for these multiple deliveries.
Thanks and regards,
Dinesh KumarHi,
In customer master in shipping screen of sales area data we have a field for partial deliveries. SAP allows 9 maximum deliveries for a single sales order. The partial deliveries should be allowed otherwise the system will not allow you to create multiple deliveries for the same order.
Create a sales order in VA01, save it. Go to VL01N and as per your requirement change the delivery qty. For example the order qty is 50. For the first time when i go to VL01N, in the delivery qty field i will change it from 50 to say 10, accordingly i will pick 10 pc only and I will do PGI. The next time i go to VL01N the system will show me 40 in delivery qty field. I will change it from 40 to 10 and do the picking & PGI. Similarly i do the same thing 3 more times. Now my sales order qty is 50 and i have 5 deliveries for this sales order.
<b>Creating single invoice:</b>
Go to VF01 and enter all the 5 different delivery numbers there and press enter. Click on execute or press "F8" the system will take you to a screen where it will show you 5 line items of the same material with 10 quantities each. Save the invoice. Thus you created a single invoice for multiple deliveries of a single sales order.
<b>Invoice split:</b>
Suppose when the delivery of the items is being done for different shipping addresses then the SH is different. Now the invoice will split - means after you enter the 5 delivery numbers and press "F8" the system will show you a button for "Split Analysis" If you click on this the system will show you the criteria because of which the split is taking place. The followig are important for invoice split:
1. Ship to party,
2. Incoterms,
3. Billing date,
4. Reference number
Reward points if solution helps.
Regards,
Allabaqsh G. Patil -
Selected Item in Create Sales Order
Hi Experts,
Does anyone knows how to fo this?
Here's the scenario. I have a multiple line items.
Lets say item 10 and its free goods item 11; item 20 and its free goods 21; and item 30 and its free goods 31.
What I need to do is to change the ship-to party of the free goods item I selected.
I'm using the USEREXIT_MOVE_FIELD_TO_VBAK (it does not pass through USEREXIT_MOVE_FIELD_TO_VBAP). My problem is, I did not know the variable that handles/holds the line item (POSNR) I selected. I need to identify the line item selected in-order to change the ship-to party.
Points will be rewarded generously for helpful answers...
Thanks in advance...
-salem-Find the user exits below for Sales order.
Transaction Code - VA01 Create Sales Order
Exit Name Description
SDTRM001 Reschedule schedule lines without a new ATP check
V45A0001 Determine alternative materials for product selection
V45A0002 Predefine sold-to party in sales document
V45A0003 Collector for customer function modulpool MV45A
V45A0004 Copy packing proposal
V45E0001 Update the purchase order from the sales order
V45E0002 Data transfer in procurement elements (PRreq., assembly)
V45L0001 SD component supplier processing (customer enhancements)
V45P0001 SD customer function for cross-company code sales
V45S0001 Update sales document from configuration
V45S0003 MRP-relevance for incomplete configuration
V45S0004 Effectivity type in sales order
V45W0001 SD Service Management: Forward Contract Data to Item
V46H0001 SD Customer functions for resource-related billing
V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
If user exists doesn't suit ur requirement then go for customer exit. Goto program MV45AFZZ then serch for Customer exists. -
Problem in uploading multiple line items while Creating sales order by BAPI
Hi experts , Im able to create sales order with one item while using this program, but the problem is when iam having multiple items or multiple sales order , iam not able to createthe line items , though its creating sales order header , Iam copy pasting my code , please add the additional code to my code to take more than 1 line items ,This is urgent requirement . Points will be rewarded for answers , Thanks in advance
*& Report Z_SO_CREATE_BAPI
REPORT Z_SO_CREATE_BAPI.
DATA: i_header TYPE bapisdhd1 occurs 0 with header line.
DATA: i_details TYPE bapisditm OCCURS 0 WITH HEADER LINE.
DATA: i_partner TYPE bapiparnr OCCURS 0 WITH HEADER LINE.
DATA: i_return1 TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: i_return2 TYPE bapiret2.
data : ORDER_HEADER_IN like BAPISDHD1.
data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with HEADER LINE .
data : ORDER_ITEMS_INX Like BAPISDITMX occurs 0 with HEADER LINE .
data : RETURN like BAPIRET2 occurs 0 with header line.
data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
header line.
DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
LiNE.
data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
header line.
data : ORDER_SCHEDULES_INX like BAPISCHDLX occurs 0 with
header line.
data : BEGIN OF TAB OCCURS 0,
SRNO(4),
DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
DIVISION like ORDER_HEADER_IN-DIVISION,
REQ_DATE_H(10),
PURCH_DATE(10),
PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
ITM_NUMBER like BAPISDITM-ITM_NUMBER,
MATERIAL LIKE ORDER_ITEMS_IN-MATERIAL ,
PLANT LIKE ORDER_ITEMS_IN-PLANT,
TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
ITM_NUMBERX like ORDER_ITEMS_INX-ITM_NUMBER ,
MATERIALX LIKE ORDER_ITEMS_INX-MATERIAL ,
CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
PLANTX LIKE ORDER_ITEMS_INX-PLANT,
TARGET_QTYX LIKE ORDER_ITEMS_INX-TARGET_QTY,
ITM_NUMBER LIKE ORDER_ITEMS_IN-ITM_NUMBER,
MATERIAL LIKE ORDER_ITEMS_IN-MATERIAL ,
PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
END OF TAB.
DATA: v_vbeln TYPE bapivbeln-vbeln.
selection-screen begin of block b1 with frame.
skip 3.
parameter:p_infile like rlgrap-filename obligatory.
skip 3.
selection-screen end of block b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
PERFORM value_help.
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_infile
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = tab.
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
**Validation for the Create SO screen
*AT SELECTION-SCREEN ON BLOCK na_create.
Loop at Tab.
i_header-doc_type = TAB-DOC_TYPE .
i_header-sales_org = TAB-SALES_ORG.
i_header-distr_chan = TAB-DISTR_CHAN .
i_header-division = TAB-DIVISION .
append i_header.
*endloop.
i_partner-partn_role = TAB-PARTN_ROLE .
i_partner-partn_numb = TAB-PARTN_NUMB.
APPEND i_partner.
i_details-material = TAB-MATERIAL .
APPEND i_details.
endloop.
*Bapi for Creating SO
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN = v_vbeln
order_header_in = i_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = v_vbeln
tables
RETURN = i_return1
ORDER_ITEMS_IN = i_details
ORDER_ITEMS_INX = ORDER_ITEMS_INX
order_partners = i_partner .
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 NOT v_vbeln IS INITIAL.
*Bapi Commit Work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
return = i_return2
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
RETURN =
ENDIF.
LOOP AT i_return1 . "INTO wa_return1.
WRITE:/ i_return1-message.
ENDLOOP.
FORM value_help .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = ',.,..'
MODE = 'O'
TITLE = ' '
IMPORTING
FILENAME = p_infile
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
txt file data
order type salesorg distch divison materialno parter role
TA PB01 01 00 000000000000000852 WE
Partner no
8101000000Hi Neerja,
you can reffer this sample code. It may not be complet soluation for your poblem,
but you will get some idea.
*& Report ZBAPI_SALESORDER_CREATE
*& Author : Karthik
REPORT ZBAPI_SALESORDER_CREATE.
data : ORDER_HEADER_IN like BAPISDHD1.
data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with
header line.
data : RETURN like BAPIRET2 occurs 0 with header line.
data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
header line.
DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
LINE.
data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
header line.
data : BEGIN OF TAB OCCURS 0,
SRNO(4),
DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
DIVISION like ORDER_HEADER_IN-DIVISION,
REQ_DATE_H(10),
PURCH_DATE(10),
PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
ITM_NUMBER like BAPISDITM-ITM_NUMBER,
CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
PLANT LIKE ORDER_ITEMS_IN-PLANT,
TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
END OF TAB.
data: itab1 like alsmex_tabline occurs 0 with header
line.
DATA: gd_currentrow type i.
data : PURCHASEORDER like ekko-ebeln.
Data: tot_rec type i, "Total Records
gd_update type i, "Main Table Increement Counter
gd_lines type i, "Success Table increement Counter
w_textout like t100-text. "VARIABLE TO GET ERRORLOG
data : begin of it_success occurs 0,
SALESDOCUMENT LIKE BAPIVBELN-VBELN, "PROJECT
end of it_success.
data : begin of it_error occurs 0,
srno(4),
err_msg(73) TYPE c, "TO RETREIVE ERROR MESSAGES
end of it_error.
data : srno(4).
DATA : SALESDOCUMENT LIKE BAPIVBELN-VBELN.
selection-screen begin of block b1 with frame.
skip 3.
parameter:p_infile like rlgrap-filename obligatory.
skip 3.
selection-screen end of block b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
PERFORM value_help.
start-of-selection.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_infile
i_begin_col = '1'
i_begin_row = '2' "Do not require
headings
i_end_col = '22'
i_end_row = '10000'
TABLES
intern = itab1
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. "Problem uploading
Excel Spreadsheet
endif.
*perform open_group.
sort itab1 by row col.
Get first row retrieved
read table itab1 index 1.
Set first row retrieved to current row
gd_currentrow = itab1-row.
loop at itab1.
Reset values for next row
if itab1-row ne gd_currentrow.
append tab .
clear tab.
gd_currentrow = itab1-row.
endif.
SHIFT ITAB1-VALUE LEFT DELETING LEADING SPACE.
case itab1-col.
when '0001'.
TAB-SRNO = itab1-value.
when '0002'.
TAB-DOC_TYPE = itab1-value.
when '0003'.
TAB-SALES_ORG = itab1-value.
when '0004'.
TAB-DISTR_CHAN = itab1-value.
when '0005'.
TAB-DIVISION = itab1-value.
when '0006'.
TAB-REQ_DATE_H = itab1-value.
when '0006'.
TAB-PURCH_DATE = itab1-value.
when '0007'.
TAB-PMNTTRMS = itab1-value.
when '0008'.
TAB-PURCH_NO_C = itab1-value.
when '0009'.
TAB-ITM_NUMBER = itab1-value.
when '0010'.
TAB-CUST_MAT22 = itab1-value.
when '0011'.
TAB-PLANT = itab1-value.
when '0012'.
TAB-TARGET_QTY = itab1-value.
when '0013'.
TAB-PARTN_ROLE = itab1-value.
when '0014'.
TAB-PARTN_NUMB = itab1-value.
endcase.
endloop.
append tab.
clear tab.
sort tab by SRNO.
LOOP AT TAB.
concatenate tab-REQ_DATE_H+4(4)
tab-REQ_DATE_H2(2) tab-REQ_DATE_H0(2) into
tab-REQ_DATE_H.
concatenate tab-PURCH_DATE+4(4)
tab-PURCH_DATE2(2) tab-PURCH_DATE0(2) into
tab-PURCH_DATE.
SRNO = TAB-SRNO.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-PARTN_NUMB
IMPORTING
OUTPUT = tab-PARTN_NUMB.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = tab-CUST_MAT22
IMPORTING
OUTPUT = tab-CUST_MAT22.
IF TAB-SRNO = SRNO.
ORDER_HEADER_IN-DOC_TYPE = TAB-DOC_TYPE.
ORDER_HEADER_IN-SALES_ORG = TAB-SALES_ORG.
ORDER_HEADER_IN-DISTR_CHAN = TAB-DISTR_CHAN.
ORDER_HEADER_IN-REQ_DATE_H = TAB-REQ_DATE_H.
ORDER_HEADER_IN-PURCH_DATE = TAB-PURCH_DATE.
ORDER_HEADER_IN-PMNTTRMS = TAB-PMNTTRMS.
ORDER_HEADER_IN-PURCH_NO_C = TAB-PURCH_NO_C.
ORDER_HEADER_IN-DIVISION = tab-DIVISION.
ORDER_ITEMS_IN-ITM_NUMBER = tab-ITM_NUMBER.
ORDER_ITEMS_IN-material = TAB-CUST_MAT22.
ORDER_ITEMS_IN-PLANT = TAB-PLANT.
APPEND ORDER_ITEMS_IN.
ORDER_PARTNERS-PARTN_ROLE = TAB-PARTN_ROLE.
ORDER_PARTNERS-PARTN_NUMB = TAB-PARTN_NUMB.
APPEND ORDER_PARTNERS.
ORDER_SCHEDULES_IN-ITM_NUMBER = tab-ITM_NUMBER.
ORDER_SCHEDULES_IN-REQ_QTY = tab-TARGET_QTY.
append ORDER_SCHEDULES_IN.
ENDIF.
AT END OF SRNO.
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_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 = ORDER_KEYS
EXTENSIONIN =
PARTNERADDRESSES =
IF SALESDOCUMENT <> SPACE.
commit work.
ADD 1 TO gd_update.
it_success-SALESDOCUMENT = SALESDOCUMENT.
append it_success.
CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
ELSE.
loop at return.
it_error-SRNO = tab-SRNO.
it_error-err_msg = return-MESSAGE .
Append it_error.
ENDLOOP.
CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
ENDIF.
endat.
endloop.
DESCRIBE TABLE it_success LINES gd_lines.
IF gd_lines GT 0.
Display result report column headings
PERFORM display_column_headings.
Display result report
PERFORM DISPLAY_SUCESS.
ENDIF.
IF SUCESS FAILS Display Error Report
DESCRIBE TABLE it_error LINES gd_lines.
IF gd_lines GT 0.
PERFORM errorheadings.
PERFORM errorreport.
ENDIF.
*& Form display_column_headings
text
FORM display_column_headings.
WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
SKIP.
WRITE:2 'The following records inserted
successfully:'(013).
WRITE:/ sy-uline(15).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'Sales order'(004), sy-vline.
WRITE:/ sy-uline(15).
ENDFORM. "display_column_headings
*Subroutine to display SUCESS REPORT
FORM DISPLAY_SUCESS.
FORMAT COLOR COL_NORMAL.
LOOP AT it_success.
WRITE:/ sy-vline,
(10) it_success-SALESDOCUMENT, sy-vline.
CLEAR it_success.
ENDLOOP.
WRITE:/ sy-uline(15).
REFRESH: it_success.
FORMAT COLOR COL_BACKGROUND.
ENDFORM. "
DISPLAY_REPORT
*& Form errorreport
text
FORM errorreport.
LOOP AT it_error.
WRITE:/ sy-vline,
(10) it_error-SRNO, sy-vline,
(40) it_error-err_msg, sy-vline.
ENDLOOP.
WRITE:/ sy-uline(104).
REFRESH: it_error.
endform. "errorreport
*& Form ERRORHEADINGS
text
FORM ERRORHEADINGS.
SKIP.
WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
SKIP.
WRITE:2 'The following records failed during
update:'(008).
WRITE:/ sy-uline(104).
FORMAT COLOR COL_HEADING.
WRITE:/ sy-vline,
(10) 'ERROR.'(009), sy-vline.
WRITE:/ sy-uline(104).
FORMAT COLOR COL_NORMAL.
ENDFORM. "ERRORHEADINGS
**& Form value_help
text
--> p1 text
<-- p2 text
FORM value_help .
CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = ',.,..'
MODE = 'O'
TITLE = ' '
IMPORTING
FILENAME = p_infile
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "value_help
Regards,
Amit. -
No Schedule Lines due erro however Selection date exist in Sales Order
Hello Experts,
I'm in process of creating a Delivery document for my sales order. I've provided Delivery date under "Schedule Lines" tab.
Now when i enter the same date in VL01N, selection screen in Requested Delivery date field along with Shipping Point and Sales Order No SAP still says
No schedule lines due for delivery up to the selected date
Message no. VL248
Anybody will know why?
Many thanks in advance.Hi,
Display your sales order. select the line item. Click on 'Schedule lines for item' button given below the item lines. It will show you the schedule line for the item. So, create delivery document for the delivery date given in the schedule line. Your delivery document will be created.
The error doesn't mean that the plant have no stock to deliver. Even the plant have enough stock, the delivery will be done as per the schedule.
Regards,
K Bharathi -
Multiple pricing procedure in single sales order
Hi Gurrus,
i have come across in a scenarion where i need to have multiple pricing procedures in a single sales order.
Does SAP support this functionality ?
actually i am using a free goods, so for the trade item i want it to be charged at "SALES GL-Code" and for free good item i want it be be charge at "BONUS GL-Code".
can anyone help me out that how can i handle this situation.Dear Shadab Ali ,
We can have only one pricing procedure .
But the pricing procedure determined in the sales order can be changed to a different pricing procedure in billing (assigning pricing procedure to billing type)
In your scenario, it is better you use 2 document type (one for trade and one for free )
This way you can trigger two pricing procedure based on the scenario.
Thanks & Regards,
Hegal K Charles -
Hi All,
Can you help me in the following issue.........?
I have Make to Order production scenario. After Production Order is confirmed material goes for QC inspection and some quantity get rejected ( need rework).
Since I have confirmed total quantity in order confirmation, if I create a rework order with reference to the sales order that will increase the production qty by the rework qty. But I need a rework order to rework on the rejected quantity.
Let me know how to resolve the issue.
Thanks and Regards,
SamarHi!,
From your mail it seems that you are doing quality inspection on GR (inspection type 04). Please carry out following steps:
1) At the time of quantity posting on usage decision please put rejected quantity in field against retuen to vendor (i.e. carry out 122 movement for the rejected material). By doing this you will find the delivered quanity on prod order reduced by the rejected quantity.
2) Now create a production order without material (CO07) for the rejected quantity and put the original order as cost receiver in the settlement rule so that all the cost incurred during rework will be settled on original order.
3. Confirm the origianl order / Final operation again for the reworked quantity and make the GR again. This will again create a new inspection lot.
4. Carry out the result recording and UD for this new inspection lot. -
Can Multiple Objects be copied into Sales Order??????
Hi,
I have created three charecteristics and assigned to a class of class type 001. In the classification view of material master for each material i assigned the class.This assignment is done for calling the object at sales order level.
I am able to find the multiple objects for single characteristics in sales order but multiple objects are not copied into sales order..only single object is copied into sales order...when i try to copy multiple objects system is throwing warning message as "You can only copy one object in this mode".... Is it possible to copy multiple objects ?? Any answers will be highly appreciated.
Ramagiri.Hi,
But what's the purpose behind that.Material Class 001 is just only for information purpose only to search the materials with help of class and characterstic.
If your material is configuable one then you have to use Class type 200 - Material (Configurable Objects) and for the same you have maintain the characterstic value during sales order creation.
Regards,
Dhaval -
Multiple Partner Function in a sales Order
Hi
I have created a partner function ZR Referred By ( Type Customer) but not able to enter multiple ZR in a sales Order
Error .VPD012. Partner Function can occur only 1 in ..
The requirement is to attach the referred customers for reporting purpose and there can be more than one customer referring this new Customer / Order.Hi
Thanks for the input but the solutions suggested by you all does not work.
The Unique button is only relevant for Customer Master and not the Order. In the Order you can have only one.
The Button Modifiable is only for allowing you to change a Partner and not adding another partner with the same partner function.
Any way I figured a way out, we can use the system provided AA ( Partner Function) and able to use multiple AAs in a Service Contract./Scheduling agreements.
But if you need to have multiple partner in a sales Order ...Only way seems to be to have Z1, Z2 Etc ...
Thanks
Maybe you are looking for
-
Trackpad no longer working properly
Hi there, my MBP trackpad has started to become more and more unresponsive, sometimes barely working at all. It may be unrelated but it seems to have started becoming a problem since I installed the latest EFI firmware update. I've searched through t
-
Change background color in notes.
Can I change background color in notes? to black with white font? If not, why doesn't Apple already make this an option?
-
I can't drag clips into my timeline - HELP!
I am working on a project at the moment and I am having issues with dragging imported clips into my timeline. I click on them to drag them down but they go grey and stay put! What is going on, can anyone help me as this is quite an urgent project.
-
Making relative calls to jar files
Hi, I want to access my help system from within a jar file using the jar protocol. The issue is that I don't want to enter a fixed path to my jar file. I want something relative like this - URL hsURL = HelpSet.findHelpSet(null, "jar:file://..\myjarfi
-
Hi Gurus, I have requirement like mail from sap z-transaction will go to manager , manger will reply that same mail. Again what he/she has replied should be captured and same has to be updated in sap. Now, I want to know what to do to for reply proce