1 order max 2 delivery billing doc for each material (10 billing DOC)
hai sap gurus
this is my customer senario . in that sd process max sale order 1 & max delivery two , but customer required multible billing documents
EXMPLE:
sale order : 10 pcs
delivery allowed ; 2(two)
billing doc ; 10 billing doc foe each pcs
plz help me to solve the issue
with advance thanks
In the Masters Customer Enter Max Partial delivery as 2 and then in the copy control of the Delivery to Invice :
VTFL
Assign the Invoice Spilt 001 (Data VBRK/VBRP )
Or you can ask you ABAPER to customize a Routine Such that :
Loop : {
If VBAP_POSNR = "variable"
Create Invoice :
regards,
SAP SD
Similar Messages
-
Assign different ship to party for each material in a sales order in CRM?
Hi all,
I need to create a sales order in CRM, such that the sales order contains more than 100 materials at item level and each material should be shipped to a different ship to party.
That is for 100 materials in sales order I need to ship to 100 different customers.
The 100 ship to partyu2019s are maintained for the business partner in relation ships tab in /nBP.
The CRM configuration is done in such a way that when we enter a material while creating a sales order in CRM,u2026u2026.a window pops up asking us to select the ship to party for that material.
No I need to replicate this programmatically. I generated a sales order in CRM programmatically using BAPI_SLSTRANSACT_CREATEMULTI. u2026 Now I need to make changes such that I have a provision to assign ship to party for each materialu2026
How can I do this? Can any one tell me if there is a BAPI or Function Module available so that I can assign a different ship to party for each material in sales order?
Regards,
Jessica SamHere is sample code. In that highlighted portion is different. check this out
DATA: ls_partner TYPE crmt_partner_com,
ls_input_fields TYPE crmt_input_field,
lt_fieldname TYPE crmt_input_field_names_tab,
ls_fieldname LIKE LINE OF lt_fieldname.
ls_partner-ref_handle = p_iv_handle.
ls_partner-ref_partner_handle = 1.
ls_partner-ref_kind = 'A'.
ls_partner-display_type = 'BP'.
ls_partner-no_type = 'BP'.
ls_partner-kind_of_entry = 'C'.
licensee
ls_partner-partner_fct = '00000069'.
ls_partner-partner_no = w_but000-partner.
INSERT ls_partner INTO TABLE gt_partner.
Bill to party
IF NOT w_con_header-billtoparty IS INITIAL.
ls_partner-partner_fct = '00000003'.
ls_partner-partner_no = w_but001-partner.
INSERT ls_partner INTO TABLE gt_partner.
ENDIF.
IF w_con_header-billtoparty IS INITIAL.
ls_partner-partner_fct = '00000003'.
ls_partner-partner_no = w_but000-partner.
INSERT ls_partner INTO TABLE gt_partner.
ENDIF.
Employee
ls_partner-partner_fct = '00000014'.
ls_partner-partner_no = w_con_header-empresp.
INSERT ls_partner INTO TABLE gt_partner.
+*lsinput_fields-ref_handle = p_iv_handle.*+_
+*lsinput_fields-ref_kind = 'A'.*+_
ls_input_fields-logical_key = ls_partner-ref_partner_handle.
ls_input_fields-objectname = 'PARTNER'.
ls_fieldname-fieldname = 'DISPLAY_TYPE'.
INSERT ls_fieldname INTO TABLE lt_fieldname.
CLEAR ls_fieldname.
ls_fieldname-fieldname = 'KIND_OF_ENTRY'.
INSERT ls_fieldname INTO TABLE lt_fieldname.
CLEAR ls_fieldname.
ls_fieldname-fieldname = 'NO_TYPE'.
INSERT ls_fieldname INTO TABLE lt_fieldname.
CLEAR ls_fieldname.
ls_fieldname-fieldname = 'PARTNER_FCT'.
INSERT ls_fieldname INTO TABLE lt_fieldname.
CLEAR ls_fieldname.
ls_fieldname-fieldname = 'PARTNER_NO'.
INSERT ls_fieldname INTO TABLE lt_fieldname.
CLEAR ls_fieldname.
ls_input_fields-field_names = lt_fieldname.
INSERT ls_input_fields INTO TABLE gt_input_fields. -
Ship to party for each material using BAPI_SLSTRANSACT_CREATEMULTI
i am able to generate sales order for in CRM. I am inputting the sold to party, ship to party, bill to party and payer at the header level...
CRM is currently configured in such a way that , there is a provision to assign ship to party at item level for each material.
How can i programatically replicate this? I need to assign a diiferent ship to party for each material in the sales order.*
how can i programatically replicate this?...
this is my code for cresating a sales order in CRM with sold to party, ship to party, bill to party and payer at the header level...
*************include constants
include crm_direct.
************// GUIDs
data: lv_guid_h type GUID_32, "HEADER GUIDE
lv_guid_i type GUID_32, "ITEM GUIDE
lv_guid_sl type GUID_32, "SCHEDULE LINE GUIDE
lv_guid_p type GUID_32. "PARTNER GUIDE
***********// Handles
data: lv_current_handle type crmt_handle, "CURRENT HANDLE
lv_handle_h type crmt_handle, "HEADER HANDLE
lv_handle_i type crmt_handle, "ITEM HANDLE
lv_handle_sl type crmt_handle, "SCHEDULE LINE HANDLE
lv_handle_p type crmt_handle. "PARTNER HANDLE
***********// Administration header + item + etc
data: lt_salesorder_header type table of bapibus20001_header_ins, "LT_SALESORDER_HEADER
ls_salesorder_header type bapibus20001_header_ins, "LS_SALESORDER_HEADER
lt_salesorder_item type table of bapibus20001_item, "LT_SALESORDER_ITEM
ls_salesorder_item type bapibus20001_item, "LS_SALESORDER_ITEM
lt_scheduleline type table of BAPIBUS20001_SCHEDLIN, "LT_SCHEDULELINE
ls_scheduleline type BAPIBUS20001_SCHEDLIN, "LS_SCHEDULELINE
lt_partner type table of BAPIBUS20001_PARTNER_INS, "LT_PARTNER
ls_partner type BAPIBUS20001_PARTNER_INS, "LS_PARTNER
ls_logical_key TYPE crmt_partner_logic_partner_key, "LS_LOGICAL_KEY
lt_organisation type table of BAPIBUS20001_ORGMAN_INS, "LT_ORGANISATION
ls_organisation type BAPIBUS20001_ORGMAN_INS. "LS_ORGANISATION
*********// Saved sales orders
data: lt_saved_process type table of bapibus20001_object_id, "LT_SAVED_PROCESS
data:
ls_saved_process type bapibus20001_object_id, "LS_SAVED_PROCESS
ls_salesorder type CRMT_RETURN_OBJECTS_STRUC. "LS_SALESORDER
data: lt_input_fields type table of bapibus20001_input_fields, "LT_INPUT_FIELDS
ls_input_fields type bapibus20001_input_fields, "LS_INPUT_FIELDS
ls_return type bapiret2. "LS_RETURN
data: lt_return type table of bapiret2. "LT_RETURN
***********// Macro definition to populate structure and input field This, called as
*_set_field ls_salesorder_header GUID lv_guid_h
*is exploded as
ls_salesorder_header-GUID = lv_guid_h.
ls_input_fields-fieldname = 'GUID'.
append ls_input_fields to lt_input_fields.
*Note 1: &2 (field name) MUST be uppercase
*Note 2: for the salesorder header, Macro has not been used to show how the code should look like.
*except for that the macro has been used everywhere else.
define setfield.
&1-&2 = &3.
ls_input_fields-fieldname = '&2'.
append ls_input_fields to lt_input_fields.
end-of-definition.
*****// end of macro definition
******// fill order administration header
perform get_guid changing lv_guid_h.
add 1 to lv_handle_h.
ls_salesorder_header-guid = lv_guid_h.
ls_salesorder_header-handle = lv_handle_h.
ls_salesorder_header-process_type = 'ZWEB'.
clear ls_input_fields.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_guid = lv_guid_h.
*ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-orderadm_h.
ls_input_fields-fieldname = 'GUID'.
append ls_input_fields to lt_input_fields.
ls_input_fields-fieldname = 'HANDLE'.
append ls_input_fields to lt_input_fields.
ls_input_fields-fieldname = 'PROCESS_TYPE'.
append ls_input_fields to lt_input_fields.
append ls_salesorder_header to lt_salesorder_header.
**********// fill organisation data (Interface needs this, some times may rely on sales org determination instead...
clear ls_input_fields.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-orgman.
setfield ls_organisation REF_GUID lv_guid_h.
setfield ls_organisation REF_HANDLE lv_handle_h.
setfield ls_organisation REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_organisation SALES_ORG_RESP SO_RESP . "(input).
setfield ls_organisation SALES_ORG SALES_ORG. "(input).
setfield ls_organisation DIS_CHANNEL DIS_CHNL. "(input).
setfield ls_organisation DIVISION DIVISION. "(input).
append ls_organisation to lt_organisation.
**********// fill order administration item
perform get_guid changing lv_guid_i.
lv_handle_i = lv_handle_h.
add 1 to lv_handle_i.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_i.
ls_input_fields-ref_handle = lv_handle_i.
*ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_i.
ls_input_fields-objectname = gc_object_name-orderadm_i.
setfield ls_salesorder_item GUID lv_guid_i.
setfield ls_salesorder_item HEADER lv_guid_h.
setfield ls_salesorder_item HANDLE lv_handle_i.
setfield ls_salesorder_item HEADER_HANDLE lv_handle_h.
setfield ls_salesorder_item ORDERED_PROD PRODUCT . "(input).
setfield ls_salesorder_item ITM_TYPE 'ZTAN'.
setfield ls_salesorder_item MODE 'A'.
*adjustment taken from standard include LCMS_MAPPERF04
*(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
delete lt_input_fields where fieldname = 'HANDLE'
OR
fieldname = 'HEADER_HANDLE'.
append ls_salesorder_item to lt_salesorder_item.
********// fill schedule line for item
perform get_guid changing lv_guid_sl.
add 1 to lv_handle_sl.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_i.
ls_input_fields-ref_handle = lv_handle_i.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_i.
ls_input_fields-objectname = gc_object_name-schedlin.
setfield ls_scheduleline ITEM_GUID lv_guid_i.
setfield ls_scheduleline GUID lv_guid_sl.
setfield ls_scheduleline HANDLE lv_handle_sl.
setfield ls_scheduleline ITEM_HANDLE lv_handle_i.
setfield ls_scheduleline QUANTITY quantity. "(input).
append ls_scheduleline to lt_scheduleline.
********// fill partner line
*perform get_guid changing lv_guid_p.
*the partner use the logical key as well
ls_logical_key-ref_partner_handle = '0001'.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = ls_logical_key.
setfield ls_partner REF_GUID lv_guid_h.
setfield ls_partner REF_HANDLE lv_handle_h.
setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_partner REF_PARTNER_HANDLE '0001'.
setfield ls_partner KIND_OF_ENTRY 'C'.
setfield ls_partner PARTNER_FCT '00000001'.
setfield ls_partner PARTNER_NO SOLD_TO. "(input).
setfield ls_partner NO_TYPE 'BP'.
setfield ls_partner DISPLAY_TYPE 'BP'.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
ls_logical_key-ref_partner_handle = '0002'.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = ls_logical_key.
setfield ls_partner REF_GUID lv_guid_h.
setfield ls_partner REF_HANDLE lv_handle_h.
setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_partner REF_PARTNER_HANDLE '0002'.
setfield ls_partner KIND_OF_ENTRY 'C'.
setfield ls_partner PARTNER_FCT '00000002'.
setfield ls_partner PARTNER_NO SHIP_TO . "(input).
setfield ls_partner NO_TYPE 'BP'.
setfield ls_partner DISPLAY_TYPE 'BP'.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
ls_logical_key-ref_partner_handle = '0003'.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = ls_logical_key.
setfield ls_partner REF_GUID lv_guid_h.
setfield ls_partner REF_HANDLE lv_handle_h.
setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_partner REF_PARTNER_HANDLE '0003'.
setfield ls_partner KIND_OF_ENTRY 'C'.
setfield ls_partner PARTNER_FCT '00000003'.
setfield ls_partner PARTNER_NO BILL_TO ."(input).
setfield ls_partner NO_TYPE 'BP'.
setfield ls_partner DISPLAY_TYPE 'BP'.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
ls_logical_key-ref_partner_handle = '0004'.
clear ls_input_fields.
ls_input_fields-ref_guid = lv_guid_h.
ls_input_fields-ref_handle = lv_handle_h.
ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = ls_logical_key.
setfield ls_partner REF_GUID lv_guid_h.
setfield ls_partner REF_HANDLE lv_handle_h.
setfield ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
setfield ls_partner REF_PARTNER_HANDLE '0004'.
setfield ls_partner KIND_OF_ENTRY 'C'.
setfield ls_partner PARTNER_FCT '00000004'.
setfield ls_partner PARTNER_NO PAYER ."(input).
setfield ls_partner NO_TYPE 'BP'.
setfield ls_partner DISPLAY_TYPE 'BP'.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
*******// example of a second partner function (custom) with data override
*ls_logical_key-ref_partner_handle = '0002'.
*clear ls_input_fields.
*ls_input_fields-ref_guid = lv_guid_h.
*ls_input_fields-ref_handle = lv_handle_h.
*ls_input_fields-ref_kind = gc_object_ref_kind-orderadm_h.
*ls_input_fields-objectname = gc_object_name-partner.
*ls_input_fields-logical_key = ls_logical_key.
*_set_field ls_partner REF_GUID lv_guid_h.
*_set_field ls_partner REF_HANDLE lv_handle_h.
*_set_field ls_partner REF_KIND gc_object_ref_kind-orderadm_h.
*_set_field ls_partner REF_PARTNER_HANDLE '0002'.
*_set_field ls_partner KIND_OF_ENTRY 'B'. "manual entry...
*_set_field ls_partner PARTNER_FCT customFct(input).
*_set_field ls_partner PARTNER_NO bpNumber(input).
*_set_field ls_partner NO_TYPE 'BP'.
*_set_field ls_partner DISPLAY_TYPE 'BP'.
*_set_field ls_partner TITLE 'Mr.'.
*_set_field ls_partner FIRSTNAME 'John'.
*_set_field ls_partner LASTNAME 'Smith'.
*_set_field ls_partner STR_SUPPL1 'John Smith and Co'.
*_set_field ls_partner STREET 'Street1'.
*_set_field ls_partner STR_SUPPL3 'Street4'.
*_set_field ls_partner HOUSE_NO '42'.
*_set_field ls_partner CITY 'Townville'.
*_set_field ls_partner DISTRICT 'Districtshire'.
*_set_field ls_partner POSTL_COD1 'AA1 2BB'.
*note now ...
*adjustment taken from standard include LCMS_MAPPERF04
*(see where-used-list for BAPI_SLSTRANSACT_CREATEMULTI, program LCMS_MAPPERU11)
*I don't use macro because name of the field in input_table is different
*_set_field ls_partner COUNTRYISO 'GB'.
*instead
ls_partner-COUNTRYISO = 'GB'.
ls_input_fields-fieldname = 'COUNTRY'.
append ls_input_fields to lt_input_fields.
*_set_field ls_partner LANGU_ISO 'EN'.
ls_partner-LANGU_ISO = 'EN'.
ls_input_fields-fieldname = 'LANGU'.
append ls_input_fields to lt_input_fields.
move-corresponding ls_partner to ls_logical_key.
append ls_partner to lt_partner.
*Create sales orders *
call function 'BAPI_SLSTRANSACT_CREATEMULTI'
EXPORTING
testrun = false
TABLES
header = lt_salesorder_header[]
item = lt_salesorder_item[]
partner = lt_partner[]
organisation = lt_organisation[]
input_fields = lt_input_fields[]
scheduleline = lt_scheduleline[]
saved_process = lt_saved_process[]
return = lt_return[].
*************// get the GUID of the created object
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = lt_return1.
INCLUDE ZZGVBAPISALESORDER_GET_GUIDF01.
Edited by: jessica sam on Dec 22, 2008 4:25 PM
Edited by: jessica sam on Dec 22, 2008 4:27 PM
Edited by: jessica sam on Dec 22, 2008 7:05 PM
Edited by: jessica sam on Dec 23, 2008 5:18 AMI know how to trace the Ship to party at line item. When i create an order manually on CRM then the table CRMD_PARTNER has the required entries and the Ship to party at line item is getting populated correctly. Also if i open the order in CRMD_ORDER the ship pto party are being populated correctly at line item..
But if i am trying to replicate this programatcally using the BAPI, i see that the ship to at header is being copied to each line item and this is not what is expected.
If i go and check in the CRMD_PARTNER the data is not filled
correctly as I dont have any ship to party at line item
So finally I even tried to insert the data manually in the CRMD_PARTNER table using an
INSERT statement and even that doesnt work...
https://www.sdn.sap.com/irj/scn/forums
So i am unable to ficgure out what is going wrong
Any body if they have any idea on poulating ship to party programatically in
sales order for each line item please help
I am unable to figure out how to fill PArtner table of this BAPI to populate ship to at line item level
Kindly Help..
Regards,
Jessica Sam -
Print out of line item wise tax for each material code.
hello all,
Requirement is that my client want to print tax of all item in purchase order seperatelyi.e.line item wise tax for each material type.
is there any standard procedure available in sap?
Your valuable input will be apperciable.
Regards
sumit bislaTake the help from ABAPer and give your requirment to print the tax at item level.
-
The quantity received/required for each material (only sum of Dep and Foreq
Hi all
I have a report and I need it to show the <b>quantity received/required</b> for each material (<b>only sum of Depreq and ForReq</b>) in a plant due to MRP execution.
Basically something like MD04 showing each MRP element entry (only sum of Depreq and ForReq)
Do anyone knows a function, bapi, or other that can helps calculate this?
Thanks in advanceHi srivalli,
U mean that for every material u need sum of recieved quntity and required qunatity? if this is your requirement.
Try the synax below.
Example.
itab - internal table of any sturcture. suppose itab consits of materil and quantity fiedls.
sort itab by matnr.
loop at itab.
At end of matnr.
Sum.
Write: itab-matnr, itab-menge.
ENDAT.
endloop.
This syntax will display the sum of quantity for each material.
<b>Reward if useful</b>
Any thing please reply back if you have any other doubt.
Regards,
sunil kairam. -
Selecting many records for each material...
Hi all,
I have an internal table that contains a list of materials. I want to loop over that list and retrieve a group of purchase reqs from EBAN for each material...appending each group of rews to my req table for each pass over the material list. Sample code;
LOOP AT GT_MATERIALS INTO WA_MATERIALS.
SELECT MENGE LFDAT
INTO CORRESPONDING FIELDS OF TABLE GT_EBAN_FIELDS
FROM EBAN
WHERE MATNR EQ WA_MATERIALS-MATNR.
???DO I DO AN APPEND OF SOME KIND HERE???
ENDLOOP.
Regards,
MatHi Mathew,
From performance point of view, the SELECT QUERY should not be under a loop. So you can do the following :
<b>SORT GT_MATERIALS.
IF not gt_materials is initial.</b>
SELECT MENGE LFDAT
INTO CORRESPONDING FIELDS OF TABLE GT_EBAN_FIELDS
FROM EBAN
<b>FOR ALL ENTRIES IN GT_MATERIALS</b>
WHERE MATNR EQ GT_MATERIALS-MATNR.
<b>ENDIF.</b>
Also if the structure of table GT_EBAN_FIELDS has only two fields MENGE, LFDAT then please remove INTO CORRESPONDING FIELDS, instead use INTO TABLE GT_EBAN_FIELDS. This is becz INTO CORRESPONDING FIELDS would affect the performance.
Best regards,
Prashant -
Dear friends
When i run Forecast based MRP in a Hotel, i am getting One P.R for every material, i having more than 2000 materials,. Can u pl guide me how can i combine the purchase requisition. what are the settings needed to avoide one P.R for each material.
Thanks
ShivaniShivani,
MRP is a planning tool, which processes one part number at a time. It is not designed to manage your client's requirements to consolidate purchase requisitions across multiple part numbers.
If your client requires that purchase requisitions be consolidated, then that is a custom requirement and will require custom programming. Get the detailed specs from the client and submit them to an ABAP'er. It would be a simple matter for a custom program to select specified purchase reqs, and consolidate them into a smaller number of reqs, and then delete the original reqs that are no longer needed.
Rgds,
DB49 -
How Assign a Buyer for Each Material
Dear experts ,
How Assign a Buyer for Each Material , for example,This person is going to buy this material in purchase dept. is there any possiblities
regards,
Rajahello,
u can achieve same results by following simple way
create purchase document types for example for raw material purchase,consumable purchase etc
then assign buyer from personal setting from each buyers computer.
regards
kedar -
Return to vendor via delivery, customer number for each vendor?
Hi
We wish to use return materials to Vendor via delivery process
addition to required configuration, we need to maintain Customer number in Vendor master
In out plant we have more than 500 Vendor masters, do we need to create customer number for each vendor? or can we create a generic customer ????
Business has a concern on creating customer for each vendor since number is huge, Sales guys may get confused with these numbers
Please suggest a way out
ThanksThanks Jurgen for the reply
We have Vendor Work flow setup in the system. Which means when ever vendor master is changed [Return indicator ticked] workflow kicks off which means it goes for approvals. This is why we dont want to go for tick as and when needed. When ever there is a return, return to vendor must be ticked, it will go for approval etc so it slows the process
we are thinking if we can achieve through data load before SAP GO-Live so that users able to return without any delay
NOTE 447070 says 'the automatic creation of the required customer data is not supported in the data transfer'
this is related to automatic customer create isnt it
i was thinking as below
--> Create Ship-to's for all vendors
--> Load vendors via LSMW [along with return to vendor ticked and customer number(created above)]
Tested in SAP
created ship-to
Created vendor with above customer number
Do you see any issue?
Thanks -
Display error messages for each material
Hi All,
I am using a BAPI which gives errors in return table.I am executing this BAPI for several materials in a LOOP.I need to display the error messages for each of these materials as shown below:
Material 1:
error1
error2
Material 2:
error 1
error 2.
What is the best way to display this?Also plz let me know how to use REUSE_ALV_HIERSEQ_LIST_DISPLAY?
Thanks,
Rakesh.I did the same thing in the below code, go thru it and check it.
* calling the BAPI to update the Asset Master AS02
loop at it_final into is_final.
* If updating of floor area only
if p_farea = 'X'.
* passing new area value to the BAPI
is_realestate-area = is_final-grufl.
is_realestatex-area = 'X'.
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
realestate = is_realestate
realestatex = is_realestatex
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.
* If the Asset Master is changed with out any errors
if flag = 'X'.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_green.
is_output-grufl_n = is_final-grufl.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting grufl_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
elseif flag = ' '.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_red.
is_output-grufl_n = is_realestate-area.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting grufl_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
endif.
endif.
* If updating of lease commencement date only
if p_ldate = 'X'.
* Passing new lease start date value to the BAPI
is_leasing-start_date = is_final-leabg.
is_leasingx-start_date = 'X'.
* Call the BAPI to change the Asset Master
call function 'BAPI_FIXEDASSET_CHANGE'
exporting
companycode = is_final-bukrs
asset = is_final-anln1
subnumber = is_final-anln2
leasing = is_leasing
leasingx = is_leasingx
importing
return = it_return.
* If Asset Master is changed with out any errors
read table it_return with key type = 'E'.
if sy-subrc = 0.
flag = ' '.
else.
flag = 'X'.
* Call the COMMIT BAPI
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'.
wait up to 2 seconds.
endif.
* If the Asset Master is changed with out any errors
if flag = 'X'.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_green.
is_output-leabg_n = is_final-leabg.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting leabg_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
elseif flag = ' '.
read table it_output into is_output with key
bukrs = is_final-bukrs
anln1 = is_final-anln1
anln2 = is_final-anln2
binary search.
if sy-subrc = 0.
* is_output-c_icon = c_red.
is_output-leabg_n = is_leasing-start_date.
is_output-message = it_return-message.
* Modify the output internal table with the changed new values
modify it_output from is_output
transporting leabg_n message
where bukrs = is_output-bukrs
and anln1 = is_output-anln1
and anln2 = is_output-anln2.
endif.
endif.
endif.
clear : is_final, is_realestate, is_leasing,
it_return, flag , is_output.
endloop.
* Display the report out with old and new values
PERFORM output_report.
*& Form output_report
* text
* --> p1 text
* <-- p2 text
*FORM output_report.
* DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
* is_layout TYPE slis_layout_alv.
** Sub routine for filling the field catalog
* IF it_fieldcat[] IS INITIAL.
* PERFORM field_fill USING it_fieldcat.
* ENDIF.
** Sub routine to set the layout
* PERFORM set_layout USING is_layout.
** Function module to display the data in ALV format
* CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
* EXPORTING
* i_callback_program = l_repid
* it_fieldcat = it_fieldcat
* is_layout = is_layout
* TABLES
* t_outtab = it_output
* EXCEPTIONS
* program_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.
*ENDFORM. " output_report
*& Form field_fill
* text
* -->P_IT_FIELDCAT text
*FORM field_fill USING pt_fieldcat TYPE slis_t_fieldcat_alv.
* DATA : ls_fieldcat TYPE slis_fieldcat_alv,
* pos TYPE i VALUE 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'C_ICON'.
* ls_fieldcat-seltext_m = 'Change Status'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'BUKRS'.
* ls_fieldcat-ref_fieldname = 'BUKRS'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'ANLN1'.
* ls_fieldcat-ref_fieldname = 'ANLN1'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'ANLN2'.
* ls_fieldcat-ref_fieldname = 'ANLN2'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* IF p_farea = 'X'.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'GRUFL'.
* ls_fieldcat-ref_fieldname = 'GRUFL'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'GRUFL_N'.
* ls_fieldcat-seltext_l = 'New Floor Area'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ENDIF.
* IF p_ldate = 'X'.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'LEABG'.
* ls_fieldcat-ref_fieldname = 'LEABG'.
* ls_fieldcat-ref_tabname = 'ANLA'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'LEABG_N'.
* ls_fieldcat-seltext_l = 'New Lease St.Date'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
* ENDIF.
* ls_fieldcat-col_pos = pos.
* ls_fieldcat-fieldname = 'MESSAGE'.
* ls_fieldcat-seltext_l = 'Status Message'.
* ls_fieldcat-tabname = 'IT_OUTPUT'.
* APPEND ls_fieldcat TO pt_fieldcat.
* CLEAR ls_fieldcat.
* pos = pos + 1.
*ENDFORM. " field_fill
Regards
Gopi -
How much space it is occupying for each Material Master in MARA table.
Hi Gurus & Markus .
If one of the functional consultant creates a Material Master in MARA how much space it will occupy for each. Like we need to create 10000 material masters.
How can i access exactly to that table in terms of db growth.
>Rahuluse this command:
select blocks from dba_tables where table_name='MARA';
then add 8 entries. then same command:
select blocks from dba_tables where table_name='MARA';
check difference between the 2, you will get a small number, you will get the number of Kbytes used per record. -
Report for production order with actual and target cost for each
Hi
Is there any report that gives me the list of all production orders in a month with its respective actual and target costs?
I can use COOIS to get a list of production orders, then double click on the prod order, then click on goto and then to cost analyis.. but can i avoid going through all this and get a report with the details i need?
thanks in advanceThanks a lot for that.
I'm a little confused with the columns in the report.
Which columns should I keep for my requirement? -
Production Order
Total Target Cost
Total Actual Cost
Total Actual Qty
Total Target Qty
Thanks -
MMBE-Sales order stock appearing under company code for the material
Hi Frens,
In MMBE, for a meterial, there is sales order stock lying in company code. Where to find the relevant documents for which the stock belongs to?
Regards,
CKHi Jimmy/V Raj,
V Raj, If I Right click on company code/Plant/storage location, I get Material Movement in inactive mode.
Jimmy, Similarly if I click on Environment < Material Movements, I get a pop up message, List of material movements: stock lines can only be accessed from plant level downwards.
This is because, in my case, stock is appearing only at Company code level.
Hope I am clear in my requirement.
Regards,
CK -
Purchase Order With Sub Item Component List for BOM material..??
Hi MM Experts,
We want to create PO with a component list that should be appears under the main item.
The component list is a mterial BOM.
Ex:- bom MATERIAL - CATALOG1 (Non Stock Materials)
COMPONENT 1 :-ABCD
COMPONENT 2 :- XYZ.
WHEN I ENTER THE BOM MATERIAL:- CATALOG1 IN /ME21N . Higher-Level Item-
Automatically botom line should be appear component 1 , 2 as a Sub Item.
how to configur this issue..?? Its a standard Ponot Subcontract
Thanks,
NAR.Hi!
If you have correctly maintained the BOM in CS01, make sure that in ME21N you enter "L" as the item category, and then, in the field "material", enter the finished product (the header material in your BOM). Then, enter all other required fields.
When all mandatory data has been completed in ME21N, go to the "Material Data" tab. Here you will see an icon named "Components". If you click this icon, the materials in your BOM will be listed here.
So, please, do not expect the BOM to be displayed with mother and daugther segments in the item overview of ME21N. Instead, consider that you will only be able to see the components if you click the "Components" icon under the "Material Data" tab at item detail level.
I hope this helps!
Esther. -
Different exchange rate on each material issued for order
Hi all,
I have strange situation like this. Controlling area currency is USD and object/company code currency is THB. When i do Good Issue for production order, system use different exchange rate for each material although all of these material are posted on the same posting date for good issue.
Example :
I do Good issue material A and material B for production order 100000 at posting date 01.03.2008. When i look into cost analysis and look for USD currency, i found that exchange rate for material A is 30 THB/USD and exchange rate for material B is 25 THB/USD. FYI i use exchange rate type m. How can this happen?? How can each material have different exchange rate although its transaction at the same posting date??
I'm waiting your advice.. Maximum point will be given.
Best regard,
YudhaI think its a bit misleading...The requirement is to post an Invoice with a base taxable amount of Exchange Rate A and a tax amount of Exchange Rate B. The Base Currency is JPY and the System Currency is SGD. So the Report S_ALR_87012357 should see the amount in SGD there. The Issue is caused by the different exchange rate on the tax amount submitted by the Vendor Invoice.
Example: Vendor Invoice Amount: 926,413.00 JPY, then we created PO to Invoice with Base Currency JPYalso amounted 926,413.00 JPY. However, in the Vendor Invoice Amount, the Tax Chargeable is 923.00 SGD (based on their exchange rate 65.66 JPY per SGD). But our Exchange Rate (System Rate) is 63.49 JPY per SGD. How can we reflect the Tax Amount as 65.66 JPY but still the correct SGD amount is based on the Vendor Original Invoice Exchange Rate 65.66 and not the System Exchange Rate, 63.49 in the same Invoice Creation (MIRO)?
Maybe you are looking for
-
I am a new user to Mail 5. I had imported all of my mail boxes and emails from Entourage -- several years worth. Subsequent to that I have switched ISPs which required some adjustments to how email accounts were accessed. I had continuing problems wi
-
Broadband upgrade to 20Mb, has it happened.
Hi everyone. We have just moved house and realised that at our new house we now have the option of upgrading to the to 20MB download broadband. So we went for it. Maybe I am jumping the gun a bit but the Activation date was yesterday and nothing appe
-
After shutdown or restart, when I first open Firefox 35.0.1 a window appears: "This version of Firefox is not supported by Norton Confidential. You will not be protected while browsing the Web. Norton Confidential cannot protect you while you use thi
-
Apple tv not recognising computer
I want to see my holiday photos on my tv by via the apple tv box. I have switched on home sharing and on the tv the photos show in photo streaming but my computer is not being recognised by the apple tv.
-
A puzzling video problem on a friend's Power G4 667Mhz
I don't know when it exactly happened, maybe around the same time she got DSL, but her PowerMac G4 667Mhz (Digital Audio) developed video problems. Her video card is the stock Nvidia Geforce 2MX 32MB video card and her monitor is an clear enclosure A