Spliting the sales order qty when iam creating production order
HI
I have sales order haveing qty 100 ,then iam creating the production order with respect to salesorder number and item by co08.
i want to split the order qty while iam creating production order .and after complitiung the sales order qty sysytem should not allow to create production order .
how can i do this
Hi,
1. I dont think in standard it is possible.
2. You need to find a control mechanism using the user exit only.
reg
dsk
Similar Messages
-
Problem in when creating the sales order
Hi to All,
I am using the function module 'BAPI_SALESORDER_CREATEFROMDAT2' to create a sales order with quotation reference. When
I executing the program the return table shows following issues
1.Document 20000292 doesn't have document category but
2.Sales document was not changed
But , when i used to create the sales order manually( TC : VA01) with reference of '0020000292' it gives the sales order number.
so,kindly suggest me.
Thank youHi,
While using BAPI, you need to give some mandatory fields . So I think document catogary is missing in header structure.
Thanks,
Srikanth.A -
Ps assembly processing:WBS have not be created when saving the sales order
In the ps assembly processing, I want to generate a network when I create a sales order. So I did the following steps:
1-Use the TCODE cj91 to create a standard WBS "E-000007.1".
2-Use the TCODE cn01 to create a standard network "10000000" and assign the standard WBS "E-000007.1" to it.
3-Use the TCODE cn08 to config the Network Parameters from Sales Order like below:
Material number : 600000-000000-0009
Order Type : Z301
Std network : 10000000
Class Type : 020
Network Profile : Z0001
MRP Controller : 001
Std WBS element : E-000007.1
4-Use the TCODE va01 to create a sales order and add an item with the material "600000-000000-0009" and save.
When the SAP R/3 System is saving the sales order, a WBS ought to be created u2013 based on the assignment of the standard network to the standard project.But I could not found the WBS.I thought I have do all of steps and could not found the reason.
So I need the experts give me some useful advice and reference to resolve the problem.Thank you.
Regards
YodaHi,
Maintain strategy group in material master MRP tab....
If problem still persist then check is there any credit block to that customer...if it is release it in VKM3....
Once you release it will create automatically.
Regards -
Not able to get the Quantity and partner details in the sales order created
Hi Experts,
I am creating a followup order using the FM "BAPI_BUSPROCESSND_CREATEMULTI" . The parameters iam passing are process type, quantity , sold to party (partner) and product ID. I am able to create a sales order but the Quantity and sold to party (partner) are not getting updated in the the sales order when i check in the transaction CRMD_ORDER. When i check in the crm_orderadm_h table and give the Headerguid , i am able to see the process type and when i check in the crm_order_index table, if i give the header i am not getting the partner no and there are two lines created for one header guid. I am providing the code which i have written. Can anyone please help me in this issue??
*& Report ZCREATEORDER_LUCKY_TEST
REPORT ZCREATEORDER_LUCKY_TEST.
DATA : LV_HEADER_GUID TYPE GUID_32,
WA_HEADER TYPE BAPIBUS20001_HEADER_INS,
ITAB_HEADER TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
ITAB_CREATED_PROCESS TYPE STANDARD TABLE OF BAPIBUS20001_HEADER_INS,
ITAB_OBJECTS_TO_SAVE TYPE STANDARD TABLE OF BAPIBUS20001_GUID_DIS,
ITAB_PARTNER TYPE STANDARD TABLE OF BAPIBUS20001_PARTNER_INS,
LT_PRODUCT_I TYPE STANDARD TABLE OF BAPIBUS20001_ITEM,
WA_PRODUCT_I TYPE BAPIBUS20001_ITEM,
LT_SCHEDLIN_I TYPE STANDARD TABLE OF BAPIBUS20001_SCHEDLIN,
WA_SCHEDLIN_I TYPE BAPIBUS20001_SCHEDLIN,
ITAB_INPUT_FIELDS TYPE TABLE OF bapibus20001_input_fields,
ls_inputfields TYPE bapibus20001_input_fields,
WA_PARTNER TYPE BAPIBUS20001_PARTNER_INS,
ITAB_RETURN TYPE STANDARD TABLE OF BAPIRET2,
WA_OBJECTS_TO_SAVE LIKE LINE OF ITAB_OBJECTS_TO_SAVE,
ITAB_PRICING TYPE STANDARD TABLE OF BAPIBUS20001_PRICING,
WA_PRICING TYPE BAPIBUS20001_PRICING,
*To store the Objects to be saved.
WA_CREATED_PROCESS LIKE LINE OF ITAB_CREATED_PROCESS,
ITAB_SAVED_OBJECTS TYPE STANDARD TABLE OF BAPIBUS20001_OBJECT_ID,
WA_SAVED_OBJECTS LIKE LINE OF ITAB_SAVED_OBJECTS,
GC_X type c.
gc_x = 'x'.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = lv_header_guid.
CLEAR : WA_HEADER.
* Passing the respective values from the Header table to internal table.
WA_HEADER-GUID = LV_HEADER_GUID.
WA_HEADER-PROCESS_TYPE = 'ZTA'.
APPEND WA_HEADER TO ITAB_HEADER.
*Appending the values to the ITAB_HEADER.
*appending orderadm_i to input fields
* ls_inputfields-ref_guid = LV_HEADER_GUID.
* ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'ORDERADM_I'.
ls_inputfields-ref_handle = '0000000001'.
* ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'ORDERED_PROD'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
* ls_inputfields-ref_guid = LV_HEADER_GUID.
* ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'ORDERADM_I'.
* ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'MODE'.
ls_inputfields-ref_handle = '0000000001'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
****** CHANGES MADE
* ls_inputfields-ref_guid = LV_HEADER_GUID.
* ls_inputfields-REF_KIND = 'B'.
ls_inputfields-objectname = 'SCHEDLIN'.
ls_inputfields-ref_handle = '0000000001'.
ls_inputfields-fieldname = 'LOGICAL_KEY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
* ls_inputfields-ref_guid = LV_HEADER_GUID.
* ls_inputfields-REF_KIND = 'B'.
ls_inputfields-objectname = 'SCHEDLIN'.
ls_inputfields-ref_handle = '0000000001'.
* ls_inputfields-logical_key = ' '.
ls_inputfields-fieldname = 'QUANTITY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
* ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'B'.
ls_inputfields-objectname = 'SCHEDLIN_I'.
ls_inputfields-ref_handle = '0000000001'.
* ls_inputfields-logical_key = ' '.
* ls_inputfields-fieldname = 'MODE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
****** CHANGES MADE
WA_PARTNER-REF_GUID = LV_HEADER_GUID.
WA_PARTNER-REF_KIND = 'A'.
WA_PARTNER-REF_PARTNER_HANDLE = '0001'.
WA_PARTNER-PARTNER_FCT = '00000001'.
WA_PARTNER-PARTNER_NO = '10017'.
WA_PARTNER-KIND_OF_ENTRY = 'C'.
WA_PARTNER-NO_TYPE = 'BP'.
WA_PARTNER-DISPLAY_TYPE = 'BP'.
APPEND WA_PARTNER TO ITAB_PARTNER.
*"ADDING VALUES TO CT_ORDERADM_I
wa_product_i-header = lv_header_guid.
wa_product_i-handle = '0000000001'.
wa_product_i-ordered_prod = '12000014'.
wa_product_i-mode = 'A'.
APPEND wa_product_i TO lt_product_i.
*"ADDING VALUES TO IT_SCHEDLIN_I
wa_schedlin_i-GUID = LV_HEADER_GUID.
wa_schedlin_i-quantity = '30'.
wa_schedlin_i-handle = '0000000001'.
wa_schedlin_i-mode = 'A'.
APPEND wa_schedlin_i TO lt_schedlin_i.
* wa_schedlin_i-schedlines = lt_schedlines.
*"ADDING VALUES TO WA_PRICING
wa_PRICING-REF_GUID = LV_HEADER_GUID.
wa_PRICING-REF_KIND = 'A'.
* wa_schedlin_i-handle = '0000000001'.
APPEND wa_PRICING TO ITAB_PRICING.
* wa_PRICING-REF_GUID = LV_HEADER_GUID.
wa_PRICING-REF_KIND = 'B'.
wa_schedlin_i-handle = '0000000001'.
APPEND wa_PRICING TO ITAB_PRICING.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = '0001'.
ls_inputfields-fieldname = 'REF_PARTNER_HANDLE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = '0001'.
ls_inputfields-fieldname = 'PARTNER_FCT'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = '0001'.
ls_inputfields-fieldname = 'PARTNER_NO'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = '0001'.
ls_inputfields-fieldname = 'NO_TYPE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = '0001'.
ls_inputfields-fieldname = 'DISPLAY_TYPE'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
ls_inputfields-ref_guid = LV_HEADER_GUID.
ls_inputfields-REF_KIND = 'A'.
ls_inputfields-objectname = 'PARTNER'.
ls_inputfields-logical_key = '0001'.
ls_inputfields-fieldname = 'KIND_OF_ENTRY'.
APPEND ls_inputfields TO ITAB_INPUT_FIELDS.
CLEAR ls_inputfields.
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
HEADER = ITAB_HEADER
ITEM = lt_product_i
RETURN = ITAB_RETURN
PARTNER = ITAB_PARTNER
INPUT_FIELDS = ITAB_INPUT_FIELDS
CREATED_PROCESS = itab_created_process
SCHEDULELINE = lt_schedlin_i
PRICING = ITAB_PRICING.
READ TABLE ITAB_CREATED_PROCESS INTO WA_CREATED_PROCESS WITH KEY GUID = LV_HEADER_GUID BINARY SEARCH.
WA_OBJECTS_TO_SAVE-GUID = WA_CREATED_PROCESS-GUID.
* Appending the Guid of the contract to be saved to the internal table
APPEND WA_OBJECTS_TO_SAVE TO ITAB_OBJECTS_TO_SAVE.
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
EXPORTING
update_task_local = space
save_frame_log = GC_X
TABLES
objects_to_save = itab_objects_to_save
saved_objects = itab_saved_objects
return = itab_return.
* Calling the Standard BAPI to Commit the transcation.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE: / 'HEADER GUID: ',lv_header_guid.
Any inputs will be highly appreciated!!
Thanks a lot in Advance.
Lakshman.solved
-
Material Listing Error while creating the sales order
Hi Guru's
I have mantained a material in the lisitng for A002 combiantion for SO/DC/Pric. ref. material
While creating the sales order is throwing an error as material is not listed so the transaction is not possible.
I have done the basic invetingation on the folowing aspects
1)checking the material in the listing
2)Validity periods
3)Material not blcoked
4)Mateial is extened for the respective sales org
Kindly help ASAP.
Thanks & Regards
TarakaramDear SAP SD 007
I can confidently tell that an enhancement or an user exit has been applied in your scenario
You have to check that
Normally when creating a sales order with respect or referring billing documents the qty will be in editable mode and it is standard problem
Your people has solved the standard problem by enhancement
Usually OR--LF-PGI----F2 (SAY THE QTY IS 25 UNITS)
Now you are creating returns order with reference to F2 in the return order type Re there is a standard issue that user can edit the qty to 30 from the original 25
To solve this only your people have used userexit
Line items and qty greyed out means definately there is some enhancement or user exit applied
You have to check that
Regards
Raja -
Error while creating the sales order with billing reference
hi alll
i am getting error while creating the sales order with billing reference.The line items are coming in grey.I am not able to change the items as well as the quantity field.Can u guide me
cheers
shalsa007........Dear SAP SD 007
I can confidently tell that an enhancement or an user exit has been applied in your scenario
You have to check that
Normally when creating a sales order with respect or referring billing documents the qty will be in editable mode and it is standard problem
Your people has solved the standard problem by enhancement
Usually OR--LF-PGI----F2 (SAY THE QTY IS 25 UNITS)
Now you are creating returns order with reference to F2 in the return order type Re there is a standard issue that user can edit the qty to 30 from the original 25
To solve this only your people have used userexit
Line items and qty greyed out means definately there is some enhancement or user exit applied
You have to check that
Regards
Raja -
When the sale order creting with route
when iam creating the sale order with route is coming automatically with route determination. but this specific order i did nt want route so deleated and save and is ove my problem. but with ref the same order i am doing it wail not appearing the route in order so pl help me
Hi,
If you have mainatined route determination, the route will be picked automatically in the order, if you dont want u can remove the route in the order itself, now if you are creating delivery wrt order the route will not be picked in the order as u have removed the route frm the order.
But if you create a order again the route will be picked if you have not deleted the route determination in the SPRO.
I was not clear as what u r asking, so if i hav not answered u completely, [;z explain wat u want to know
Noopur -
ATP check in the Sale order Processing and CO06 transaction (Confirm Qty)
Hi All,
While creating the Sale order, After performing the ATP check and saving the document i have called an user exit to make the confirmed Quantity equal to ZERO when the delivery block is set (As requested by customer). That is working fine...
But the same confirmed Quantity of ZERO is not reflecting in CO06 transaction. Its showing the old value that the value before setting the delivery block.
I have identified the table VBBE-VMENG which stores the confirmed quantity in CO06 transaction...
Could you please help me know any USER EXITS or any other solution to change the confirmed quantity to ZERO in CO06 transaction also while delivery block is set in the sale order.
Thanks &Regards,
NavaneethHi All,
Please help me by providing some clues on this issue...
Regards,
Navaneeth -
ERROR WHILE CREATING THE SALES ORDER
Hi,
When creating the sales order i am entering "mode of transport"in TSW details and while trying to save it im getting a message saying "Express document "update was terminated"" recieved from the author "Rahul". If i dont enter the TSW detail while creating i am able to save the order and later in change mode i can enter the mode of transport.
When i check the inbox, it says "definately cannot transfer message to node SMTP due to connection error".
This is hapenning for only one user.
What could be the problem?
Regards,
Rahul.Hi Rahul,
I think you need to enter the mode of transport in external details where it will take for further processing. TSW is different process.
Thanks
Pravin -
When will EK02 appear in the Sales Order?? For different planning strategy?
Hi Experts,
In our SAP system ,when you create a sales order with a material which planning strategy is
50 Planning without final assembly (MTO) , in the item detail screen , on the "Conditions"
TAB, we will see condition type EK02 and its value.
But when I create a sales order with a material which planning strategy is 40 Planning with
final assembly (MTS),in the item detail screen , on the "Conditions" TAB, condition type
EK02 will not appear.
I have checked the customizing of our SAP system ,as follows:
For planning strategy 50, the Requirements class is "045"(MTO val. with cons.),and on the
configuration screen of Requirements class,we see "Condition type for copying costs from
line items" (CndTyLineItems) is null ,no value ,not "EK02".
And for planning strategy 50,the the Requirements class is "050"(Warehouse consumpt.) and
and on the configuration screen of Requirements class,we see "Condition type for copying
costs from line items" (CndTyLineItems) is also null ,no value ,not "EK02".
And on the configuration screen of Sale Order Type screen(VOV8), we see "Condition type for
copying costs from line items" (CndTyLineItems) is "EK02" for all the sales order type we
have used.
So I am very confused.
Why material with planning strategy 40 there is no EK02 in the sales order?
Why material with planning strategy 50 there is EK02 in the sales order?
Where is the EK02 come from? The requriement class ? Or the Salse order Type?
Are there any other customizing for Condition type EK02 determination?
Thanks very for any reply!!Hi,
In MTO you will create Process order.
And to Produce a Item you use Sub components that is Raw material
That raw material cost is EK02 which you maintain in the Material Master - Accounting View 1.
You can see cost in the Process Order also .
Note : Dont post same in different posts -
Multiple ship to party address default setting in the " sales order creat
we use the SAP ECC 6.0,
I've a problem about the "ship to party" in the sales order creation,
the customer have 3 ship to party,
the pop up "Partner selection", default show is: "Title" , "Name1"....
But I want to default to show the "Street"
I check the sap notes: 302835, and add the "SD_VARIANT_MAINTAIN" = A in my user profile.
But seems can't working,
when click the right mouse button. A menu can't displayed.
Does anyone have the experience, Thanks.It seems so strange ...
First of all you need to set the ALV administrator parameter among the parameters of your user-id
System-> User Profile> Own Data> Parameters
add the parameter "SD_VARIANT_MAINTAIN" = A in your user profile and SAVE
After that, execute VA01 again; when the ship to party selection pop-up appears, place your cursor at a point on the screen and just the hotspot appears , click with the right mouse button in order to open the context menu.
The "Administration" function would serve only to set the default display variant; the functions "Current Layout", "Save Layout" allow you to create the variant with the needed fields (the popup is an ALV .... )
Try to execute the described steps and give us asap a feedback...
Regards,
Andrea -
Creating the Sales Order using the bapi BAPI_SALESORDER_CREATEFROMDAT2
Hi,
My problem is , i have created one module pool program for accelerating the Sales Order creation.
I am using the bapi BAPI_SALESORDER_CREATEFROMDAT2 for sales order creation. After executing the program
bapi is given an errot that, incomplete sales order document is saved.
Can any body tell me plz what are the necessary fields i need to take in the header and item level , so that the complete
document will be saved through BAPI.
<removed_by_moderator>
Thanks
Edited by: Julius Bussche on Jan 11, 2010 12:09 PMTABLES: VBAK, "Sales Document: Header Data
VBAP. "Sales Document: Item Data
*************************************WORK AREA DECELERATION************************
DATA: BEGIN OF WA_HEADER,
LI TYPE I, "LINE TYPE
AUART TYPE VBAK-AUART, "Sales Document Type
VKORG TYPE VBAK-VKORG, "Sales Organization
VTWEG TYPE VBAK-VTWEG, "Distribution Channel
SPART TYPE VBAK-SPART, "Division
KUNNR TYPE BAPIPARNR-PARTN_NUMB, "Customer number
END OF WA_HEADER.
DATA: BEGIN OF WA_ITEM,
LI TYPE I,
MATNR TYPE VBAP-MATNR, "MATERIAL NUMBER
ZMENG TYPE VBAP-ZMENG, "QUANTITY
END OF WA_ITEM.
***********************************INTERNAL TABLE DECELERATION***************************************
DATA: IT_HEADER LIKE TABLE OF WA_HEADER WITH HEADER LINE. "IT FOR HEADER
DATA: IT_ITEM LIKE TABLE OF WA_ITEM WITH HEADER LINE. "IT FOR ITEM
DATA: IT LIKE VBAK OCCURS 0 WITH HEADER LINE.
***************************SALES ORDER INTERNAL TABLE DECELERATION********************************
DATA:
HEADER TYPE TABLE OF BAPISDHEAD WITH HEADER LINE, "SALES HEADER DATA
ITEMS TYPE TABLE OF BAPIITEMIN WITH HEADER LINE, "SALES ITEM DATA
PARTNERS TYPE TABLE OF BAPIPARTNR WITH HEADER LINE. "SALLES PARTNERS
***********************************DYNAMIC FIEL PATH GETTING DECELERATION************************
DATA : HL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_SPATH', "SCREEN FIELD NAME
HL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_SPATH', "Local file for upload/download
IL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH', "SCREEN FIELD NAME
IL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH', "Local file for upload/download
FL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH', "SCREEN FIELD NAME
FL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH'. "Local file for upload/download
DATA : CTR TYPE I .
DATA : CTR2 TYPE STRING.
DATA : CTR1 TYPE STRING.
Sales document number
DATA : L_VBELN LIKE BAPIVBELN-VBELN.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
SELECTION-SCREEN : SKIP.
PARAMETER : P_HPATH TYPE STRING.
PARAMETER : P_IPATH TYPE STRING.
SELECTION-SCREEN : SKIP.
SELECTION-SCREEN : END OF BLOCK B1.
SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE T2.
SELECTION-SCREEN : SKIP.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN : PUSHBUTTON 10(14) UPLOAD USER-COMMAND CLICK1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******************************************INITIALIZATION.***************************************************
INITIALIZATION.
T1 = 'Putchase Order Source File Path'.
T2 = 'Push Button'.
UPLOAD = 'Upload'.
*******************************************AT SELECTION SCREE EVENT********************************************
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'CLICK1'.
IF P_HPATH IS INITIAL AND P_IPATH IS INITIAL. "CHECKING BTHE THE TEXT BOX
MESSAGE I009.
ELSE.
PERFORM SELECT. "CALLING THE SELECT SUBROUTINE
ENDIF.
WHEN OTHERS.
MESSAGE 'PRESS FORM BUTTON' TYPE 'I'. "WHEN EXECUTE BUTTON IS PRESSED
ENDCASE.
***********************************GETTING HEADER FIEL PATH*******************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_HPATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = HL_FIELD_NAME
IMPORTING
FILE_NAME = HL_FILE_NAME.
P_HPATH = HL_FILE_NAME.
***********************************GETTING ITEM FIEL PATH*******************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = IL_FIELD_NAME
IMPORTING
FILE_NAME = IL_FILE_NAME.
P_IPATH = IL_FILE_NAME.
START-OF-SELECTION.
*& Form SELECT
text
--> p1 text
<-- p2 text
FORM SELECT .
CALL FUNCTION 'GUI_UPLOAD' " function resposible to get the local flat
EXPORTING " and upload it in a internal table
FILENAME = P_HPATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = IT_HEADER.
CALL FUNCTION 'GUI_UPLOAD' " function resposible to get the local flat
EXPORTING " and upload it in a internal table
FILENAME = P_IPATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = IT_ITEM.
LOOP AT IT_HEADER.
Initialize Header values
HEADER-DOC_TYPE = IT_HEADER-AUART.
HEADER-SALES_ORG = IT_HEADER-VKORG.
HEADER-DISTR_CHAN = IT_HEADER-VTWEG.
HEADER-DIVISION = IT_HEADER-SPART.
APPEND HEADER.
PARTNERS-PARTN_ROLE = 'WE'.
PARTNERS-PARTN_NUMB = IT_HEADER-KUNNR.
APPEND PARTNERS.
CTR = 10.
LOOP AT IT_ITEM WHERE LI = IT_HEADER-LI.
CTR2 = CTR.
CONCATENATE '0000' CTR2 INTO CTR1.
***Initialize Item values
ITEMS-ITM_NUMBER = IT_ITEM-ITEM.
ITEMS-ITM_NUMBER = CTR1.
ITEMS-MATERIAL = IT_ITEM-MATNR.
ITEMS-REQ_QTY = IT_ITEM-ZMENG.
APPEND ITEMS.
CTR = CTR + 10.
ENDLOOP.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
ORDER_HEADER_IN = HEADER "SALES HEADER DATA
IMPORTING
SALESDOCUMENT = L_VBELN "RETRIEVED SALES DOCUMENT NUMBER
TABLES
ORDER_ITEMS_IN = ITEMS "SALES ITEM LEVEL DATA
ORDER_PARTNERS = PARTNERS. "SAKES PARTNERS
APPEND L_VBELN TO IT.
COMMIT WORK AND WAIT.
CLEAR : HEADER , ITEMS[] ,PARTNERS,CTR,CTR1,CTR2.
REFRESH : ITEMS.
ENDLOOP.
IF IT[] IS NOT INITIAL.
LOOP AT IT.
WRITE: / 'SALES ORDER', IT-VBELN , 'CREATED'.
ENDLOOP.
LEAVE TO LIST-PROCESSING.
SET PF-STATUS SPACE.
ELSE.
MESSAGE I044.
ENDIF .
ENDFORM. " SELECT -
Can we block the sales order after creating ?
Can we block the sales order after creating ?
If how to do.
Thanks
nareshHi
Naresh
If you want to block the sales order then go to
>Header -- shipping tab
There u will find the column of delivery block there u put any reason. This way u block the sales order.
Another way u can give reason for rejectioon this way also u block the order and as and when u want to desp u can remove the reason/block.
Hope this will help you.
Thx. -
Hello PP GURUS I am new to this and i have one issues. I.e., While creating the Production Order, want the unit in the production order should be based on the sales order unit instead of what has been defined in the material master. Since, having 3-4 alternate unit of a material & can create a Sales Order in any one of them.
Also pls let me how to go through
either with the help of ABAP or configuration.
If it is with the configuration pls let me know the solution to arrive.
Eg: Base UOM is KGS
Alt UOMs: SQM, MTR, NOS
Sale order is Prepared with SQM and the same shall be in production order too to produce qty.
Pls help me.
rgds,
Kumar VHi
First you have to maintain alternate units in mateial master for that first go in additional data & maintain the alternate units as below..
For example
1200 M2=1 KG For SQM
12 M=1 KG For MTR
3 PC=1 KG For NOS
And then you can get Sales unit field in sales data 1 view enter your sales unit in that field & you will get production unit in work scheduling views as per your desire production units and according to that units your sale order & production order will pick that units & you can proceed accordingly but remember that first maintian the conversion factor as above other wise it will not accept hope that it will help you have a nice day...
Regards,
Reena -
Partner Function "Vendor" missing when the sales order is replicated to ECC
Hi Gurus,
We are facing a problem on replication of functions partners between
sales order of CRM and ECC.
We have downloaded vendors (partners of table LFA1) from ECC to CRM
following note 883162 and this replication was ok!
We have mapped all partner functions from ECC to CRM and from CRM to
ECC for distribution of partners between systems.
We must include a vendor using partner function '0000092 - Carrier' on
our sales order, which is transferred to ECC. However, when the sales
order is transfered to ECC, the vendor (which was included on CRM) is
missing.
When the sales order is created on ECC and the partner (type carrier)
is included in, the order arrives on CRM missing only the partner
number, because the partner function is there.
How to fix this problem?
Best Regards,
Nivea FariaHi,
See this Note : 975195
Hope this helps.
Best Regards
Shiven
Maybe you are looking for
-
A seeming small change by Verizon causes major monetary and unrecovera​ble damages
A seeming small change by Verizon causes major monetary and unrecoverable damages Back, I think in March or so, Verizon changed how they bill. Prior to this time frame my elderly mom paid the phone bill and I paid the DSL bill. The DSL bill came on m
-
How do I find a corrupt file on my iPod Classic?
I had an iPod Classic which started rebooting itself as I would navigate the menu. At the suggestion of a friend I mailed it to a non-Apple repair shop in Kansas City. I paid $160 for them to install a new hard drive and it was returned to me, but
-
In 2008, 2009, 2010, I bought numerous seasons of a lot of TV seasons. I backed them up on a WD Passport, then bought a new iMac and had my old one totally cleaned and re-installed the OS. Is there a way to recoup these purchases! I probably have clo
-
Batch Determination in time of Goods Issue
Hi, We are doing internally numbered Batches. We got 4 btches say A- 10kg,B- 10Kg, C- 10Kg, D- 10kg. I want to issue 30kg, at this time I want to select Batches automatically by the system which has stock thru FIFO. So that system will create 3 line
-
Itunes gives error about 64 bits even after i downloaded 64 bit
when i wanted to sync my ipod i got an message that i had to download itunes 64 bits, when i did that i wanted to open itunes but then i got an another error that the library.itl wasn't good so itunes still doesn't work. please help me cause i can't