Problem with BOM Quant while creating Sales order with reference using BAPI
Dear All,
I am facing problem with creating a slaes order with reference to other sales order by using BAPI_SALESORDER_CREATEFROMDAT2 .
Sales order is getting created but
1. It exploding the BOM means the line items which are not there in the reference SO also coming in the new SO ( all BOM items are coming )
2. Schedule line for BOM header item is getting copied to all sub items of BOM.
Can any one help me out to prevent the above deviations in creating Sales order with reference by using BAPI_SALESORDER_CREATEFROMDAT2.
Note: while passing the parameters to BAPI_SALESORDER_CREATEFROMDAT2
all the data related to items is exactly the same as in the original Sales Order.
Thanks in advnace.
Regards,
John
Hi All,
Can any one help me !!!!!!!!!!
please
Similar Messages
-
Error while creating sales order with ref to contract
while creating sales order, with refernce to contract system is giving a message
Configuration not possible for material : Reason 3 --> Help
Message no. V1360
and the message is as follwed can any one explain
Diagnosis
This may have been caused by one of the following:
1. The configuration profile for the material allows or requires the bill of materials to be exploded during order processing. However, a plant has not been specified in the item.
2. The configuration profile of the material allows or requires the bill of materials to be exploded during order processing, but the order quantity in the item must be greater than 0.
3. A configuration profile has not been maintained
or
A configuration is not permitted for the material
or
4. The configuration profile of the material allows or requires the bill ofmaterials to be exploded during order processing. However, the system could not determine a date because important data is missing from the item (see incompletion log).Hi
I think you have both Variant configuration and BOM.
Pls ensure the following.
1. BOM masterdata is maintained for the variants
2. Variant configuration is configured correctly
Configuration profile is created for the material
Knowledge base object and run time version are available
3. Maintain materials as not relevant for delivery or dont give delivery quantity as 0
Once you are sure that these are in proper shape, you can start creating order. The problem wont come.
Reward points if it helps you. -
Error while creating sales order with ref using SD_SALESDOCUMENT_CREATE
Hi
I am creating sales order with reference using function module SD_SALESDOCUMENT_CREATE , while creating i am getting error
Document doesn't have document category even thougth i am passing document category in header as well as item lavel.
In VBUK table there is no value for VGTYP.
Can you please help me how to resolve it.
Thanks & regards
kiranProblem resolved by passing REFDOC_CAT in the FM along with SD_DOC_CAT.
Thanks -
Avoid substitute material.., while creating sales order with BAPI?
Hi experts.
I use BAPI_SALESDOCU_CREATEFROMDATA1 function module to create a sales order.
Material A has a substitute material B with substitute reason 0005.
So if I use material A when creating sales order with above BAPI function, the order is created with material B.
I don't want to substitute the material automatically. I want to create the sales order with material A.
What should I do? Help me please.
Thanks in Advance.Hi bvrn Reddy,
I know, your message is almost two years old, but, did you find a solution? I'm facing the same problem. The material A has B as substitute, but in va01 a popup appears (its customizing inside the substitution reason, strategy = A). Of course, we have no popup inside the bapi, but there must be a way to decide which material the bapi should use. At the moment I only get the substitute, never the old mat (even there is something in stock).
Maybe you've got a helpful hint for me, thanks!
Ben -
Not using substitute material while creating sales order with function?
hi experts.
I use SD_SALESDOCUMENT_CREATE function to create a sales order.
Material A has a substitute material B with substitute reason 0005.
So if I use material A when creating sales order with SD_SALESDOCUMENT_CREATE, the order is created with material B.
I don't want to substitute the material automatically. I want to create the sales order with material A.
What should I do? Help me please.
Edited by: Ji Yeob Kim on Nov 19, 2009 11:34 AMHi Kim,
I also have same requirement. Please suggest how you resolved this?
Thanks
bvrnreddy -
Problem while creating Sale Order with Reference
Hi Friends,
While creating a Sale Order with Reference, I am unable to copy few fields from Profit Segement(CO - PA Data) in Account assignment Tab.
Any solution how to copy all field values which are in Reference Sale Order Number.
Regards,
sg.Hi,
Go to VOFM you will find out data transfer routine.
Over here go for the order data transfer routine and select your data transfer routine which you use.
Now check you field name and table name for that particular field which was not copying.
It will be better if you ask your abaper for this.
You have to make changes over here only for data transfer routine.
Hope so this will help you out.
Regards
Raj. -
BOM explosion while creating sales order
hi
i created a fert ,verp and halb in the palnt XX
created a BOM for fert with level 5 for halb and VERP as stock item
for fert in MM01 item category is ERLA and extended with sales org
while raising sales order for fert am getting error as
HALB and VERP is not copied for BOM
pls help meresolved
created a sales view for the HALB and ROH
Edited by: geepee on Jan 27, 2010 10:51 AM -
Error while creating sales order with network/project
Dear All,
we are getting the following message while creating a sales order with assembly processing with network/project system .
The standard Network used as a reference contains assignments to a standard WBS. However you have maintained WBS assignments manually.which assignment should be used?
manually maint pre-defined
reward points are assured for valuable help.
thanking you
Best regards,
R.SrinivasanDear Murali,
Thankyou very much for your reply.We have checked for these things which you have mentioned.
ie
Assignment of Standard WBS in the Standard network and WBS Assignment of Operastional network.We are still getting this error.
Kindly let me know What are the other possibilities for this error.
Thanking you,
Best regards,
R.Srinivasan -
Issue with profit center while creating sales order (VA01).
Hello Gurus,
When I creating sales order (Material need to be configure from VA01->Extra->Configuration) with reference of existing then XVBAP is populating the correct profit center. But when creating new sales order from scratch for the same material, at that time XVBAP is getting wrong profit center for index 2.
Thanks in Advance!!Debugging Sales order at Enhancement MV45AFZB ->form userexit_move_field_to_cobl.
-
While creating sales order wrt quotation customer code field is in display
Hi all,
I am facing one problem, while creating sales order with reference to quotation customer code field is in display mode.
I am not able to change the customer code. But i want to change it accordingly.
Previously it was in changeable mode only but now it is not in changeable mode.
Can anyone please tell me the solution for this issue?
Thanks in advance
Babuhi
is that happening only when you create sales order wrt quotation,try creating normal sales order and see whether customer is in changable mode
regards
senya -
Issue when creating sales order with Sold-to/Ship-to Party's state
Hi All,
we have issue while creating Sales Order with picking up of State tax
for Ship-to-party & Sold-to-party.
<b>When we create a sales order, for the sold to party 140052732 and
ship to party 140052733 it is picking state tax. Which should not
suppose to pick? Because the partner is marked as tax exemption</b>.
Can any body tell me how can we solve this issue!
Why this is happening!
How to make not to pick tax when it is marked for tax exemtion.
As i am not Functional guy i am not aware what is happening here!
Can anybody solve this issue!
Thanks in advance.
Thanks,
Deep.Hi Deep
What do you mean by "It is picking up state tax"? Does it mean that in the pricing procedure it is picking up a condition type which is meant for state tax?
If so go and check the condition record meant for it. Follow the following steps
1) Go to Sales order
2) Select the line item for which the state tax is being picked.
3) In the condition tab select analysis.
4) In Analysis you shall find the condition type meant for state tax.
5) See which condition record has been found.
6) Go to VK12, enter the state tax condition type and check the condition record for that state tax.
7) If wrong correct it.
8) If anything else come back to the post and inform the details
Thanks
Regards
Sunil -
Issue when creating sales order with Sold-to/Ship-to Party's state tax
Hi All,
we have issue while creating Sales Order with picking up of State tax
for Ship-to-party & Sold-to-party.
<b>When we create a sales order, for the sold to party 140052732 and
ship to party 140052733 it is picking state tax. Which should not
suppose to pick? Because the partner is marked as tax exemption</b>.
Can any body tell me how can we solve this issue!
Why this is happening!
How to make not to pick tax when it is marked for tax exemtion.
As i am not Functional guy i am not aware what is happening here!
Can anybody solve this issue!
Thanks in advance.
Thanks,
Deep.Hi Deep
What do you mean by "It is picking up state tax"? Does it mean that in the pricing procedure it is picking up a condition type which is meant for state tax?
If so go and check the condition record meant for it. Follow the following steps
1) Go to Sales order
2) Select the line item for which the state tax is being picked.
3) In the condition tab select analysis.
4) In Analysis you shall find the condition type meant for state tax.
5) See which condition record has been found.
6) Go to VK12, enter the state tax condition type and check the condition record for that state tax.
7) If wrong correct it.
8) If anything else come back to the post and inform the details
Thanks
Regards
Sunil -
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. -
How to hide componant row of BOM while creating sales order OR AR Invoice
Dear expert
my client wants to create Sales order with Sales BOM, but they do not want to see componant product while create sales order or AR invoice they want to see only parent items.
Please help me asapHi,
check below link
Avoid printing child items of Sales BOM in AR Invoice
Regards
Deepak Tyagi -
Pricing problem while creating sales order doc
Hi friends,
My requirement is to create sales order with ref to contract i am using 'BAPI_SALESORDER_CREATEFROMDAT2' , and I am extracting data from konv table to get price through condition record , but i am getting 4 messages
(S) SALES_HEADER_IN has been processed successfully
(E) Condition PR00 is not allowed as header condition
(W) The sales document is not yet complete: Edit data
(E) Sales document was not changed
and i am not getting pricing for created sales order document.
please help.
regards,
Sravani.solved
Maybe you are looking for
-
Regarding picking files from sender Adapter
I want to pick files from multiple directories from the sender adapter. Is there any way to write a module fro the above functionality? If possible, please provide the solution for the above query
-
22" ADC to an Xbox 360 with HDMI output?
I have a 22" ADC Cinema Display, along with an Apple DVI->ADC adapter. Would I be able to connect my LCD to an Xbox 360 through HDMI to DVI (via an adapter)->DVI to ADC? The native resolution of my monitor is 1600x1024. If so, what would be the neces
-
Dual loop control for positioning system.-- motion ocntrol
I am currently doing a dual loop control for a positioning system, i use the tachometer to read the velocity and the position encoder about the position of the platform. the problem i am currently encounter is that i am not sure weather the compute
-
Unable to start OBIEE 11g services
Hi all, I restored my Laptop to previous system timestamp. and Installed Bitdefender Internet security on top of my resoted system. Before this process, I used to login into obiee Answers. After This restoring Process,when i start BI services, I am g
-
Problems with regular GSM reception?
Hi, I've had poor reception since I bought the iPhone 3G at the end of July. After updating to 2.0.2, what was poor reception has become terrible reception, but I am not just having problems on 3G networks. I know others have had the experience that