Configuration is not updating in sales order using function module SD_SALESDOCUMENT_CREATE
Hello Experts,
we are using SD_SALESDOCUMENT_CREATE function module to create sales order.
Sales order is creating successfully but the configuration for the items are not updating.
Could any one help me out on this ....we tried in different ways but couldn't ....
Here is the code....
*---Filling Configuration data
*--- Filling Configuration Reference Item / Instance
w_sales_cfgs_refinst-posex = w_items-itm_number.
w_sales_cfgs_refinst-config_id = '000001'.
w_sales_cfgs_refinst-inst_id = '00000001'.
APPEND w_sales_cfgs_refinst TO t_sales_cfgs_refinst.
CLEAR w_sales_cfgs_refinst.
*---Filling Configuration Reference Data SALES_CFGS_REF Table
w_sales_cfgs_ref-posex = w_items-itm_number.
w_sales_cfgs_ref-config_id = '000001'.
w_sales_cfgs_ref-sce = '1'.
w_sales_cfgs_ref-root_id = '00000001'.
w_sales_cfgs_ref-complete = 'T'.
w_sales_cfgs_ref-consistent = 'T'.
APPEND w_sales_cfgs_ref TO t_sales_cfgs_ref.
CLEAR w_sales_cfgs_ref.
*---Filling Configuration Instances SALES_CFGS_INST Table
w_sales_cfgs_inst-config_id = '000001'.
w_sales_cfgs_inst-inst_id = '00000001'.
w_sales_cfgs_inst-obj_type = 'MARA'.
w_sales_cfgs_inst-class_type = '001'.
w_sales_cfgs_inst-obj_key = w_sales_items_in-material.
w_sales_cfgs_inst-quantity = w_items-target_qty.
w_sales_cfgs_inst-quantity_unit = 'EA'.
w_sales_cfgs_inst-complete = 'T'.
w_sales_cfgs_inst-consistent = 'T'.
w_sales_cfgs_inst-OBJECT_GUID = 'T'.
w_sales_cfgs_inst-PERSIST_ID_TYPE = w_sales_items_in-material.
APPEND w_sales_cfgs_inst TO t_sales_cfgs_inst.
CLEAR w_sales_cfgs_inst.
*---Filling Configuration Characteristic Values SALES_CFGS_VALUE Table
LOOP AT w_items-itm_config INTO wa_itm_config.
w_sales_cfgs_value_in-config_id = '000001'.
w_sales_cfgs_value_in-inst_id = '00000001'.
w_sales_cfgs_value_in-charc = wa_itm_config-charc_name.
w_sales_cfgs_value_in-value = wa_itm_config-charc_value.
APPEND w_sales_cfgs_value_in TO t_sales_cfgs_value.
*---Filling Configuration Variant Condition Key SALES_CFGS_VK
w_sales_cfgs_vk-config_id = '000001'.
w_sales_cfgs_vk-inst_id = '00000001'.
w_sales_cfgs_vk-vkey = wa_itm_config-charc_name.
APPEND w_sales_cfgs_vk TO t_sales_cfgs_vk.
CLEAR : w_sales_cfgs_value_in,w_sales_cfgs_vk.
ENDLOOP.
Regards,
Harsha P
Hello All,
Actually there was a bug in my code to update configuration for an item in sales order
Below is my Updated Code with that i can updated configuration successfully....
*---Filling Configuration data
*---Filling Configuration Reference Data SALES_CFGS_REF Table
w_sales_cfgs_ref-posex = w_items-itm_number.
w_sales_cfgs_ref-config_id = '000001'.
w_sales_cfgs_ref-sce = '1'.
w_sales_cfgs_ref-root_id = '00000001'.
w_sales_cfgs_ref-complete = 'T'.
w_sales_cfgs_ref-consistent = 'T'.
APPEND w_sales_cfgs_ref TO t_sales_cfgs_ref.
CLEAR w_sales_cfgs_ref.
*---Filling Configuration Instances SALES_CFGS_INST Table
w_sales_cfgs_inst-config_id = '000001'.
w_sales_cfgs_inst-inst_id = '00000001'.
w_sales_cfgs_inst-obj_type = 'MARA'.
w_sales_cfgs_inst-class_type = '300'.
w_sales_cfgs_inst-obj_key = w_sales_items_in-material.
w_sales_cfgs_inst-quantity = w_items-target_qty.
w_sales_cfgs_inst-quantity_unit = 'EA'.
w_sales_cfgs_inst-complete = 'T'.
w_sales_cfgs_inst-consistent = 'T'.
w_sales_cfgs_inst-object_guid = w_sales_items_in-material.
w_sales_cfgs_inst-persist_id_type = 'G'.
APPEND w_sales_cfgs_inst TO t_sales_cfgs_inst.
CLEAR w_sales_cfgs_inst.
*---Filling Configuration Characteristic Values SALES_CFGS_VALUE Table
LOOP AT w_items-itm_config INTO wa_itm_config.
w_sales_cfgs_value_in-config_id = '000001'.
w_sales_cfgs_value_in-inst_id = '00000001'.
w_sales_cfgs_value_in-charc = wa_itm_config-charc_name.
w_sales_cfgs_value_in-value = wa_itm_config-charc_value.
APPEND w_sales_cfgs_value_in TO t_sales_cfgs_value.
*---Filling Configuration Variant Condition Key SALES_CFGS_VK
w_sales_cfgs_vk-config_id = '000001'.
w_sales_cfgs_vk-inst_id = '00000001'.
w_sales_cfgs_vk-vkey = wa_itm_config-charc_name.
APPEND w_sales_cfgs_vk TO t_sales_cfgs_vk.
CLEAR : w_sales_cfgs_value_in,w_sales_cfgs_vk.
ENDLOOP.
CLEAR : w_sales_items_in,wa_mara,w_items,w_sales_schedules_in,
w_items-itm_number.
ENDLOOP.
Cheers,
Harsha
Similar Messages
-
How to create Billing Plan in sales order using Function module /BAPI
hi,
How to create Billing Plan in sales order using Function module /BAPI
i hv check few FM such
BILLING_SCHEDULE_READ
BILLING_SCHEDULE_GET_NUMBER
BILLING_SCHEDULE_SAVE
But unable to create billing plan for a sales order.....any other method to create???Hi,
Use this link.
Create sales order with billing plan via LSMW and BAPI BUS2032
BAPI or Function to update Billing Plan in Sales Order Items
Hope this will help you.
Regards,
Vijay -
Condition type value not update in sales order
Hello Guru's
As per the sales order in VA01 the condition type value i.e surcharge value is not updating in sales order.
But I have maintain the condition record(Surcharge)also and in Condition technique I have checked every thing is correct .
please find below I have attached the Screen short .
Please give me solution Asap.Hi Sukdev,
Have you checked the respective pricing procedure for From and To reference step maintained against the condition type ZSUR?
Regards,
T.R.S.Praveen -
'Transit time' not updated in Sales orders.
Dear Experts
We have maintained '20.00' days for the Route.
Then the Sales order got created and the same route has been determined.
But while i checking the schedule line - shipping details.
The Transit time not reflected in the Sales order...
All those GI date/Loading date/MAD/TPD...etc, still the same date as Delivery date.
Hope kindly advise, why the 20 transit days not updated in Sales order??
Thank you very much.The delivery date will confirmed based on ur availability check .
Check ur setting for transportation planning for this . -
Variant Configuration not updated in Sales Order
We've added new variant configuration and used an ECN with a current date; and the configuration does show up in the similator CU50; however, in the sales order, using this same ECN date or even tomorrow it will not pull in. If you use the following Monday as the requested delivery day, the new configuration will update. Does anyone have experience with this date delay?
Thank you,
Laurie
Global Electric MotorcarsIn a Sales document, VC will use the BOM_Explosion date (STDAT ?) I'm going from memory here. Look for OSS notes, 'cuz it "depends" on where it gets that date, wether its the Requested delivery date, or something else.
-
Quantity update into sales order using BAPI_SALESORDER_CREATEFROMDAT2
Hi All,
I am able to create a sales order using the BAPI "BAPI_SALESORDER_CREATEFROMDAT2".
But even after assinging the Target_quntity and the Target_quantity_units, the values are not getting updated into the Sales order, but the sales order gets created .
Did anyone of you had a similare problem, how was it solved.
cold some one please help me out on this.
RegardsHi
I had used below code (using <b>BAPI_SALESORDER_CREATEFROMDAT1</b>)..but never faced any problem.. you can try the same...
Regards,
Raj
REPORT z_sd_salesorder_create
NO STANDARD PAGE HEADING
LINE-SIZE 150
MESSAGE-ID zz.
S T R U C T U R E D E C L A R A T I O N S *
TYPES: BEGIN OF x_ppl,
ppl_order(18), " ppl Orderno
auart(4), " Sales Doc Type
vkorg(4), " Sales Organization
vtweg(2), " Distribution Channel
spart(2), " Division
div(3), " Division
kunnr(10), " Sold-to Party
date(10), " Doc Dt
matnr(18), " Item Matnr#
uom(3), " UOM
qty(15), " Qty
kschl(4), " Pricing condiiton type
kbetr(11), " Rate
END OF x_ppl.
TYPES: BEGIN OF x_file,
loc(30), " Location
div(3), " Division
ppl_order(18), " ppl Orderno
kunnr(10), " Sold-to Party
date(10), " Doc Dt
matnr(20), " Item Matnr#
qty(15), " Qty
uom(3), " UOM
kbetr(11), " Rate
discount(5), " Discount
END OF x_file.
TYPES: BEGIN OF x_output,
ppl_order(18), " ppl Orderno
mesg(130), " Mesg Success/Error
END OF x_output.
TYPES: BEGIN OF x_werks,
name2(30), " Location
werks TYPE werks_ext, " Plant
END OF x_werks.
TYPES: BEGIN OF x_info,
vkorg TYPE vkorg , " Sales org
vtweg TYPE vtweg, " Dist channel
werks TYPE werks_ext," Plant
spart TYPE spart, " Storage Loc
END OF x_info.
TYPES: BEGIN OF x_material,
ppl_prdid(20), " ppl Prd id
matnr TYPE matnr, " Material (SAP)
END OF x_material.
I N T E R N A L T A B L E D E C L A R A T I O N S *
DATA: it_file TYPE STANDARD TABLE OF x_file WITH HEADER LINE." File Data
DATA: it_data TYPE STANDARD TABLE OF x_ppl WITH HEADER LINE." ppl File
DATA: it_out TYPE STANDARD TABLE OF x_output WITH HEADER LINE. " Outcome
DATA: it_werks TYPE STANDARD TABLE OF x_werks WITH HEADER LINE. " Plant
DATA: it_info TYPE STANDARD TABLE OF x_info WITH HEADER LINE. " Othr Info
DATA: it_matnr TYPE STANDARD TABLE OF x_material WITH HEADER LINE. " Material Info
DATA: it_item TYPE STANDARD TABLE OF bapiitemin WITH HEADER LINE. "Order Itm data
DATA: it_partner TYPE STANDARD TABLE OF bapipartnr WITH HEADER LINE. "Order Partner data
V A R I A B L E S D E C L A R A T I O N S *
DATA : v_correct TYPE i,
v_error TYPE i,
v_total TYPE i,
v_return LIKE bapireturn1,
v_index LIKE sy-tabix.
*- Return values
DATA: it_orderh TYPE bapisdhead, "Order Hdr data
order TYPE bapivbeln-vbeln,
soldto TYPE bapisoldto,
shipto TYPE bapishipto,
return TYPE bapireturn1.
DATA: hdate TYPE sy-datum.
U S E R I N P U T S S C R E E N *
SELECTION-SCREEN: BEGIN OF BLOCK blk01 WITH FRAME TITLE text-t01.
PARAMETERS: p_file TYPE rlgrap-filename OBLIGATORY. " File name
SELECTION-SCREEN END OF BLOCK blk01.
S E L E C T I O N S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_file.
S t a r t o f S e l e c t i o n *
START-OF-SELECTION.
PERFORM get_upload.
PERFORM validate_data. " Validate the data
PERFORM data_swap. " Prepare the data for processing
IF NOT it_data[] IS INITIAL.
PERFORM get_update. " Create SalesOrders
ELSE.
MESSAGE i001(zz) WITH text-001.
STOP.
ENDIF.
E n d o f S e l e c t i o n *
END-OF-SELECTION.
IF NOT it_data[] IS INITIAL.
PERFORM get_write.
ENDIF.
*& Form get_file
Get File name
FORM get_file .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = syst-repid
mask = '*'
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
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. " get_file
*& Form get_upload
to upload the file
FORM get_upload .
DATA l_file TYPE string.
CLEAR: it_file, it_file[].
l_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = it_file
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.
ELSEIF sy-subrc = 0.
SORT it_file BY loc ppl_order.
ENDIF.
ENDFORM. " get_upload
*& Form get_update
Creating mapping Data in Z table
FORM get_update .
DATA: l_itemno(2) TYPE n,
l_partner TYPE parvw,
l_kunnr TYPE kunnr,
l_matnr TYPE matnr,
l_mesg TYPE string,
l_kbetr TYPE p DECIMALS 2.
DATA: l_in_qty LIKE vbap-zmeng,
l_meins LIKE mara-meins,
l_qty LIKE vbap-zmeng.
CLEAR: v_correct, v_error, v_total.
SORT it_data BY ppl_order.
LOOP AT it_data.
CLEAR v_index.
v_index = sy-tabix.
*- New SalesOrder
AT NEW ppl_order.
READ TABLE it_data INDEX v_index.
CLEAR: it_orderh, it_item, it_partner,
order, soldto, shipto, return,
it_item[], it_partner[].
v_total = v_total + 1. "Increment Total SalesOrders counter
CLEAR l_itemno.
l_itemno = '10'.
*- Covert date fields into Internal format
CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
EXPORTING
datum = it_data-date
dtype = 'DATS'
IMPORTING
idate = it_data-date.
*- Populate SalesOrder header data.
CALL FUNCTION 'CONVERSION_EXIT_AUART_INPUT'
EXPORTING
input = it_data-auart
IMPORTING
output = it_data-auart.
it_orderh-doc_type = it_data-auart.
it_orderh-sales_org = it_data-vkorg.
it_orderh-distr_chan = it_data-vtweg.
it_orderh-division = it_data-spart.
it_orderh-purch_no = 'DEPOT'.
it_orderh-price_date = it_data-date. "Doc Dt
it_orderh-req_date_h = it_data-date. "Del.Dt
it_orderh-purch_no_s = it_data-ppl_order.
*- Partner data
CLEAR: l_partner, l_kunnr.
*- Convert Partner type into internal format
l_partner = 'SP'. "SoldTo Party
CALL FUNCTION 'CONVERSION_EXIT_PARVW_INPUT'
EXPORTING
input = l_partner
IMPORTING
output = l_partner.
*- Convert Customer into internal format
l_kunnr = it_data-kunnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_kunnr
IMPORTING
output = l_kunnr.
it_partner-partn_role = l_partner.
it_partner-partn_numb = l_kunnr.
APPEND it_partner.
CLEAR it_partner.
ENDAT.
*- Item data
it_item-itm_number = l_itemno.
*- Convert material number into internal format
CLEAR l_matnr.
l_matnr = it_data-matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = l_matnr
IMPORTING
output = l_matnr
EXCEPTIONS
length_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
it_item-material = l_matnr.
*- Call FM to get new qty based on SAP UOM
CLEAR: l_meins, l_qty, l_in_qty.
l_in_qty = it_data-qty.
CALL FUNCTION 'Z_GET_QTY_FROM_UOM'
EXPORTING
matnr = it_item-material
in_meins = it_data-uom
in_qty = l_in_qty
IMPORTING
out_meins = l_meins
quantity = l_qty.
IF sy-subrc = 0.
it_data-qty = l_qty.
it_data-uom = l_meins.
ENDIF.
it_data-qty = it_data-qty * 1000.
it_item-req_qty = it_data-qty.
it_item-sales_unit = it_data-uom.
it_item-req_date = it_data-date.
*- Pricing data
it_item-cond_type = it_data-kschl. "Pricing condition
CLEAR l_kbetr.
l_kbetr = it_data-kbetr / 10. "Price (Rate)
it_item-cond_value = l_kbetr.
APPEND it_item.
CLEAR it_item.
*- Increment Item counter.
l_itemno = l_itemno + 10.
*- At end of SalesOrder
AT END OF ppl_order.
READ TABLE it_data INDEX v_index.
*- Call the BAPI for SalesOrder creation
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
order_header_in = it_orderh
IMPORTING
salesdocument = order
sold_to_party = soldto
ship_to_party = shipto
return = return
TABLES
order_items_in = it_item
order_partners = it_partner.
IF sy-subrc = 0.
COMMIT WORK.
ENDIF.
v_return = return+0(1).
IF v_return = 'E'.
v_error = v_error + 1.
CLEAR l_mesg.
l_mesg = return.
CONDENSE l_mesg.
ELSE.
v_correct = v_correct + 1.
CLEAR l_mesg.
CONCATENATE 'Salesorder'(007) order 'successfully created.'(008)
INTO l_mesg SEPARATED BY space.
CONDENSE l_mesg.
ENDIF.
*- Populate the output table
CLEAR it_out.
it_out-ppl_order = it_data-ppl_order.
it_out-mesg = l_mesg.
APPEND it_out.
CLEAR it_out.
ENDAT.
ENDLOOP.
ENDFORM. " get_update
*& Form get_write
Write the results
FORM get_write .
WRITE:/ 'Total Number of Records :'(002), v_total COLOR 1.
WRITE:/ 'Total Correct Records :'(003), v_correct COLOR 3.
WRITE:/ 'Total Error Records :'(004), v_error COLOR 6.
SKIP 3.
IF NOT it_out[] IS INITIAL.
WRITE:/5 'ppl Order #'(005),
28 'Message'(006).
ENDIF.
SKIP 1.
LOOP AT it_out.
WRITE:/5 it_out-ppl_order,
28 it_out-mesg.
ENDLOOP.
ENDFORM. " get_write
*& Form validate_data
Validate the data
FORM validate_data .
DATA: l_bstkde TYPE bstkd_e.
LOOP AT it_file.
SELECT bstkd_e INTO l_bstkde
UP TO 1 ROWS
FROM vbkd
WHERE bstkd_e = it_file-ppl_order.
ENDSELECT.
IF sy-subrc = 0. " This ppl Order is already been created in SAP, so delete record
DELETE it_file.
ENDIF.
ENDLOOP.
SORT it_file BY ppl_order.
ENDFORM. " validate_data
*& Form data_swap
Prepare the data for processing
FORM data_swap .
CLEAR: it_werks, it_info, it_matnr, it_data,
it_werks[], it_info[], it_matnr[], it_data[].
IF NOT it_file[] IS INITIAL.
*- Get the plant from location
SELECT name2
werks
INTO CORRESPONDING FIELDS OF TABLE it_werks
FROM t001w FOR ALL ENTRIES IN it_file
WHERE name2 = it_file-loc.
IF sy-subrc = 0.
SORT it_werks BY name2 werks.
*- Get the Sales Org, Division and Distribution Channel
IF NOT it_werks[] IS INITIAL.
SELECT vkorg
vtweg
werks
INTO CORRESPONDING FIELDS OF TABLE it_info
FROM tvkwz FOR ALL ENTRIES IN it_werks
WHERE werks = it_werks-werks.
IF sy-subrc = 0.
LOOP AT it_info.
it_info-spart = '99'.
MODIFY it_info INDEX sy-tabix.
ENDLOOP.
SORT it_info BY vkorg vtweg werks.
ENDIF.
ENDIF.
ENDIF.
*- Get material from ppl material
SELECT ppl_prdid
matnr
FROM zppl_master
INTO TABLE it_matnr FOR ALL ENTRIES IN it_file
WHERE ppl_prdid = it_file-matnr.
IF sy-subrc = 0.
SORT it_matnr BY ppl_prdid matnr.
ENDIF.
ENDIF.
*- Update the data in it_data
LOOP AT it_file.
CLEAR it_data.
it_data-auart = 'OR'.
it_data-auart = 'OR'. " CHANGED BY Jo ON 3103005
READ TABLE it_werks WITH KEY name2 = it_file-loc BINARY SEARCH.
IF sy-subrc = 0.
READ TABLE it_info WITH KEY werks = it_werks-werks BINARY SEARCH.
IF sy-subrc = 0.
it_data-vkorg = it_info-vkorg.
it_data-vtweg = it_info-vtweg.
ENDIF.
ENDIF.
*- Material
READ TABLE it_matnr WITH KEY ppl_prdid = it_file-matnr BINARY SEARCH.
IF sy-subrc = 0.
it_data-matnr = it_matnr-matnr.
ENDIF.
it_data-ppl_order = it_file-ppl_order.
it_data-date = it_file-date.
CONCATENATE it_file-kunnr it_file-loc+1(2) INTO it_data-kunnr.
it_data-qty = it_file-qty.
it_data-uom = it_file-uom.
it_data-kbetr = it_file-kbetr.
*- Pricing condition
it_data-kschl = 'PR00'.
CASE it_file-div.
WHEN 'BRN'.
it_data-div = '04'.
WHEN 'GEN'.
it_data-div = '03'.
WHEN 'IVF'.
it_data-div = '02'.
WHEN 'OPH'.
it_data-div = '01'.
ENDCASE.
it_data-spart = it_data-div.
APPEND it_data.
CLEAR it_data.
ENDLOOP.
ENDFORM. " data_swap -
Project Revenue Plan Not Update from Sales Order Item
I am generating a network and project from the sales order item using Assembly processing. I am using milestone billing on the sales order item and the milestones attached to the project network activities are appearing as billing blocks on the sales order item billing plan. However, the project revenue is not getting updated from the sales order billing plan. Can someone please help?
I have deleted the billing plan on the billing WBS element and activated revenue planning update from sales order in cusomization for PS. I am looking at CNS41 under the project revenue sched in version 0. Is there a different report I should be looking at?
Regards,
Venkat.HI Venkat,
You are looking at the correct report & I believe you have also done the necessary customization. If you create a sales order and reference it to a quotation, the related plan values in the WBS element are refreshed automatically.
When the payment data is recorded, the terms of payment and the customer payment history are taken into consideration. One of the probable causes could be the credit limit of the customer might have been exceeded. Take help of your SD consultant & increase the credit limit for that customer (from the sales document), t-code FD32 if it is permitted in the business.
After the new credit limit is set execute the following steps:
u2022 Go to the t-code Change billing request (VA02)
u2022 Open the required billing request
u2022 Remove the account assignment of WBS element from each line item
u2022 Save the billing request
u2022 Reopen the billing request in change mode
u2022 Reassign the WBS elements to all line items
u2022 Now the changed credit limit will take affect
u2022 Check the Planned Revenue for the said project in CNS41, it should get updated.
Rgds
Deepak -
Statistic condition values not updated during Sales order Settlement
Hi,
In our client we have different Price condition types for based on scenario wise. Ex: Domestic Sales (ZPR1) and Export Sales ZPR2. I have maintained separately value fields for each price condition types.
We are booking some financial charges, and interest on working capital etc., this cost we need to transfer to COPA each Material wise based on sales revenue.
For this purpose we have created one COPA Assessment Cycle. Tracing factor is Sales Revenue and receiver is Materials.
In COPA Assessment cycle we can give only one base means ZPR1 related value field or ZPR2 related value field.
For this reason we have created one new statistic condition type, what is amount there in ZPR1 that amount will updated automatically in statistic condition place and so that we can give once one trance factor in COPA Assessment Cycle. We have assign this statistic condition all pricing procedure
Now my problem is in MTS scenario statistic condition values updated correctly. But in MTO scenario sales order settlement time statistic condition values not updated.
So is it possible update during sales order settlement time statistic condition values.
Please give me suggestion.
Regards,
ThiruHi Ajay Sir,
As you said is correct.
But in our client we have around 9 Plants and each plant manufacturing product are different. Client Requirement is in COPA Report they need see each product wise sales revenue. In this way we mapped product wise value field. System already mapped one guy in this way earlier. Now I am doing some changes for relevant to month end activities.
Some financial changes transfer to COPA each plant wise on Material. Here sender is cost center and receiver is Material. Base is Sales Revenue.
Please suggest me is there any alternative.
Regards,
Thirumalesh . -
Not Updating Open Sales Orders Value for CreditManagement
Hi Frendz,
This is the first time am implementing creditmanagement in my system tested simple credit limit check working fine.
Now testing Static and Dynamic(Automatic) it also working fine but Its not caliculating open sales orders value either static or dynamic while Creating s.o, settings made clicked on open s.o, i have already created sales orders value of 10th.
EX:- customer balance is 2lacs, credit limit is 1lac while creating s.o it always showing balance 1lac only(Instead of 1lac10th) with open sales order value is 10th.
Let me know Where i have missd settings.
Hari Prasadhello,
it is maintained against the cr control area in ent structure.
one needs to change there.
r u in prd system or development?
becoz if prd, then this change will effect a lot of ongoing docs.
rgs,
AK -
Letter of Credit value is not updated against Sales Order
Hi SAP Gurus,
I have created LC in VX11N. When I am assigning the LC in the item level while creating the sale order, in the LC master, the open value is still remaining the same. It is not getting adjusted against the sale order value.
For Ex: Against Rs. 1 lakh of LC of the Customer, we create a Sale Order of Total Value Rs.80,000/-. Then the remaining balance of Rs.20,000/- is not getting upadted in the Open Value field in the LC Master.
Also, in the sale order LC screen part, the tab Ret. beside pmt. guarantee form is remaining at 0%. It is not getting edited.
Plz suggest is this a configuration issue or SAP Standard doesn't support LC fully.
Regards
SubratHi SAP Gurus, I am also facing the same problem of open value of Letter of crdit not getting updated. Kindly solve this. It is very urgent.
Regards,
Anant Saraogi -
Ztable not updating in sales order user exit
Hi Genius Abapers.
We want to take text ID data of sales order into Ztable. For taking the data we have used user exit in sales order. Now the problem is if we go through debug mode then the Ztable is updating but if we remove the break point Ztable is not getting updated.
Please give solution for this problem
Regards
NarayanaHi Gurus,
I am basically from SD and we used commit statements in the programme and this is the code we used
Include name --- MV45AF0B_BELEG_INITIALISIEREN
**********************************Code Addd by paresh 8.10.2007 starts *******************************
DATA : BEGIN OF itab_so OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
spras LIKE t002t-spras,
END OF itab_so.
DATA : BEGIN OF itab_so1 OCCURS 0,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-posnr,
spras LIKE t002t-spras,
END OF itab_so1.
DATA : BEGIN OF it_tabid OCCURS 0,
tdid LIKE stxh-tdid,
tdspras like stxh-tdspras,
END OF it_tabid.
DATA : is_stxh TYPE stxh.
DATA g_header TYPE string .
DATA wa_plain_text TYPE zplain_text.
DATA t_lines LIKE tline OCCURS 0 WITH HEADER LINE.
DATA g_item(16)." type i.
data :it_ztable type table of ZPLAIN_TEXT .
data wa_ztable type zplain_text.
data flag.
*****************************Read Header text***************************************
*loop at vbak.
itab_so1-vbeln = vbak-vbeln.
itab_so1-posnr = vbak-posnr.
itab_so1-spras = vbak-wklnd.
APPEND itab_so1.
CLEAR itab_so1.
ENDLOOP.
refresh it_tabid.
clear it_tabid.
refresh it_ztable.
clear it_ztable.
LOOP AT xvbap.
itab_so-vbeln = vbak-vbeln.
itab_so-posnr = xvbap-posnr.
itab_so-spras = xvbap-wklnd.
APPEND itab_so.
CLEAR itab_so.
ENDLOOP.
LOOP AT itab_so.
SELECT tdid tdspras FROM stxh INTO TABLE it_tabid WHERE tdobject = 'VBBK' AND tdname = vbak-vbeln .
ENDLOOP.
*loop at it_ztable into wa_ztable.
LOOP AT itab_so.
LOOP AT it_tabid.
is_stxh-tdobject = 'VBBK'.
is_stxh-tdname = vbak-vbeln.
is_stxh-tdid = it_tabid-tdid.
is_stxh-tdspras = it_tabid-tdspras.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = is_stxh-tdid
language = is_stxh-tdspras
name = is_stxh-tdname
object = is_stxh-tdobject
TABLES
lines = t_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc = 0.
LOOP AT t_lines.
CONCATENATE g_header t_lines-tdline INTO g_header SEPARATED BY space.
ENDLOOP.
wa_plain_text-application = 'SO'.
wa_plain_text-key1 = itab_so-vbeln.
wa_plain_text-key1 = vbak-vbeln.
wa_plain_text-key2 = 'HDR'.
wa_plain_text-sub_application = it_tabid-tdid.
wa_plain_text-text = g_header.
wa_plain_text-last_date = sy-datum.
MODIFY zplain_text FROM wa_plain_text .
wait up to 60 seconds.
commit work.
CLEAR: wa_plain_text.
CLEAR : g_header,t_lines.
refresh t_lines.
ENDIF.
if sy-subrc <> 0.
delete from zplain_text where key1 = vbak-vbeln and
key2 = itab_so-posnr and
SUB_APPLICATION = it_tabid-tdid.
commit work.
endif.
ENDLOOP.
ENDLOOP.
*endloop.
Please do me the needfull
Regards
Manam.Narayana -
Financial Document not updated with Sale Order Number
Hello,
I wish to update the Financial document posting from the billing document with the Sales order and line item number against the revenue account.
This is not populating in COBL-KDAUF.
I have seen some other messages concerning this, but none with answers.
Is this possible, I assume it is.
If so, are there any other necessary settings?
We are not using CO-PA, and I can get the reference number & /or allocation field to populate with the sales order number but not line item. But I want the coding block filled so that BSEG VBEL2 is populated.Hi Roger,
In the situation that you have a 1:1 relation this is possible with a substitution and look then to the order in the first line from the invoice.
Where you can have a look to is the sumarization in FI and CO. TC OBCY for VBAK and VBRK.
Example:
When you have 2000 posting lines in an invoice the system can create 1 posting line by used G/L account
With this transaction you can set-up that there is create one posting line by:
(G/L account)
Sales order number
You have first to look how your set up is. (perhaps when this is set-up correct you have already the order number in the field).
Paul -
Delivery block not updated in sales order after released VKM3
Hi all,
I am facing below error
after released credit block throuh VKM3 also i am unable to delivery becasue it is not updated still block exist in sales order level.
i made all nacessary settings for that and also i tried through VKM1 but this tcode through error no poosible entries.
Thanks in advance
Srinivasahi,
check the following steps of assignment you did right or not
1)first check in t- code FD32 U assigned authorization person & each credit limit U shud assign
an authorization person along with credit limit
2) check - conditon records with KRML output is there or not
please read standard SAP config help as a check point doc.[Credit mgmt|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/SDBFCM/SDBFCM.pdf]
Let me know if it is soling your issue...
rgards,
rajeev -
Remainder amount of contract not updated in sales order
I have a value contract with orders on it. However, when I create a new sales order on this contract, the amount which appears is the contract value instead of the remaining amount.
Could you please let me know how to have the remaining amount of the contract appear in new sales and not the total amount of the contract item.
Thanks,Hello,
Update Document Flow option is available only at Item Level in copy control setting from Contract to Sales Order.
Check out your Copy Control Records at Item Level. There would be "2" mentioned in "pdate document flow" box.
2 means Create doc. flow records except for dely/goods issue/billdoc. Here you to maintain "X" for Complete Document flow.
Hope this helps,
Thanks,
Jignesh Mehta -
BAPI_SALESORDER_CREATEFROMDAT2 Quantity is not updating in sale orders
Hi All,
the BAPI is creating sales orders without quantity but i am passing target quantity in ORDER_ITEMS_IN but still the sales orders which has been created doesn't have the quantity field updated. Please let me know if you have any answeres on this. i am using BAPI_SALESORDER_CREATEFROMDAT2.
Regards,
KumarHi,
You have to fill schedule line data also. Fill the structures ORDER_SCHEDULES_IN & ORDER_SCHEDULES_INX.
order_schedules_in-itm_number = <itemnumber>.
order_schedules_in-sched_line = '0001'.
order_scehdules_in-req_qty = <qty>
append order_schedules_in.
order_schedules_inx-itm_number = <itemnumber>.
order_schedules_inx-sched_line = '0001'.
order_scehdules_inx-req_qty = 'X'.
order_schedules_inx-updateflag = 'I'.
append order_schedules_inx.
Regards
Vinod
Maybe you are looking for
-
Previewing video in the iTunes store not working
When I go to preview any video in the iTunes store, I just get a blank pop-up square but the video never play. I also have this problem in Safari 5 (some videos work, some don't - those that don't work in chrome). Would appreciate any help.
-
HI, I had to reverse a payment for manual check 200018, cancel the invoice and the GR then reissue the GR and IR and now I want to pay with the same manual check the balance for vendor 477 but I can no longer find check 200018 in the system, not even
-
Hi Experts, I was written a ALV report and it works fine but the user want the total should be appear on first line. How to bring All Totals on First Line in ALV default...? Thanks, Yusuf
-
Internal Order Assigned to - Report
Hi Friends, Is there any standard report for checking the internal order for which its is assigned to. Ex. Purchase Order, Asset transactions and for some custom programs etc. Regards, Anil
-
Hi I would like to know what is the easiest way to do the following: Source account - 123 ,if "+" import to HFM account ABC and if "-" import to account DEF Please help.