OTC . How is freight calculated in OM header level

Hi
We have this business scenario where Freight is calculated at order header.
But we were checking the API for that
WSH_INTERFACE_GRP.Create_Update_Freight_Costs
This is done at Delivery or Delivery detail level.
So CANT we have freight costs at order header level???
Basically i have say 3 labels created for an order i need to generate freight for these 3 labels. Please not 3 labels DOES NOT correspond to 3 lines.
So can i create Freight lines for these 3 labels for that order header Id.
And also another question is for RETURN orders we wont have any deliveries then how are freight cost calculated
Regards
Gibin

FUNCTION ZSAVE_NOTES_SAVE.
*"*"Local interface:
*" IMPORTING
*" VALUE(OBJECT_ID) TYPE CRMT_OBJECT_ID
*" VALUE(OBJECT_TYPE) TYPE CRMT_SUBOBJECT_CATEGORY
*" REFERENCE(HEADER) TYPE THEAD OPTIONAL
*" REFERENCE(TEXT) TYPE TDTXTLINES
*" TABLES
*" LINES STRUCTURE TLINE
TYPES : BEGIN OF STRUC,
GUID TYPE CRMD_ORDERADM_H-GUID,
END OF STRUC.
DATA : WA_STRUC TYPE STRUC,
IT_STRUC LIKE TABLE OF WA_STRUC.
TYPES : BEGIN OF STRUC1,
TDOBJECT TYPE STXH-TDOBJECT,
TDNAME TYPE STXH-TDNAME,
TDID TYPE STXH-TDID,
TDSPRAS TYPE STXH-TDSPRAS,
TDTITLE TYPE STXH-TDTITLE,
TDLINE TYPE STXH-TDTXTLINES,
END OF STRUC1.
DATA : WA_STRUC1 TYPE STRUC1,
IT_STRUC1 LIKE TABLE OF WA_STRUC1.
SELECT SINGLE GUID FROM CRMD_ORDERADM_H INTO WA_STRUC WHERE
OBJECT_ID = OBJECT_ID AND OBJECT_TYPE = OBJECT_TYPE.
SELECT SINGLE TDOBJECT TDNAME TDID TDSPRAS TDTITLE TDTXTLINES FROM STXH
INTO WA_STRUC1 WHERE TDNAME = WA_STRUC-GUID.
APPEND WA_STRUC1 TO IT_STRUC1.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = HEADER
INSERT = ' I '
SAVEMODE_DIRECT = ' X '
OWNER_SPECIFIED = ' SAPUSER '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER = HEADER
TABLES
LINES = LINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Have alook at the follolwing threads
Probelem with SAVE_TEXT
SAVE_TEXT FUNCTION MODULE
save_text?
there are many more examples.

Similar Messages

  • How to print material document in header level?

    Hi Guys,
    How to print material document from header level. I can only print them in item level. But i want that in header level. For example, I have 4 movements inside a material document and I want to issue only one output from the header level.
    I can see the option Goto -> Additional Function -> output, but it is disabled. Please let me know hot to acheive this and if you need further info on this. Please throw some light on this.
    Thanks
    Yasin.

    HIi
      Your question is not clear.  What exactly you want to be.
    1.  To print material header in your smart form / Sap Script what is the problem. Itu2019s quite easy you can do it. Let me know what problem you are facing.
    2. The option is disables because of business functionality ask your functional guys to help you on the same.
    Regards
    Swati

  • How to manually delete Po at header level ?

    Hi,
    I can delete PO line items in my ECC60 system
    However, i would like to delete PO at header level.
    In EKKO , i can see the deletion flag in LOEKZ field.
    BUT in ME22N, i cannot find any button to delete PO at header level...
    Could somebody clarify the PO deletion at header level and the LOEKZ deletion flag in EKKO ?
    Kind regards,
    Yann

    Yann,
    To my knowledge you cannot directly delete PO from the system. You need to follow the archiving steps...
    1. Program: RM06EV47 - For setting Deletion Indicator
    2.  Program: RM06EW47 - For archiving the document.
    3. Program: RM06ED47 - For Deletion from the system.
    If you need further details you can go through this link <a href="http://help.sap.com/saphelp_47x200/helpdata/en/8d/3e4b63462a11d189000000e8323d3a/frameset.htm">Archiving Purchase documents</a>
    Hope this helps....Reward your points and close the thread if so,
    Regards,
    Prasobh

  • How to attach documents to QM02 Header level

    Hi,
    I have the requirement to implement a BAPI to attach the documents which has been submitted on the portal to be created in the Header level of the Quality Notification(QM02).
    I have gone through few forums which are related to GOS attachments. But i colud not able to understand.
    Please help me on this regard,
    Thanks in advance,
    Sathi

    Friends,
    This is very urgent, please give me your valuable suggesions.
    Thanks,
    Sathi

  • BAPI_SALESORDER_SIMULATE How to get the conditions on header level?

    Hi,
    is it possible to get the pricing conditions on header level (sales order) with the Bapi BAPI_SALESORDER_SIMULATE?
    We only found the information on item level?
    Thanks a lot.

    hope its possible,
    If don't specify any item no for condition type in bapi, then it will be consider as header condition.
    make sure condition should be header condition.
    hope it will work.
    Regards,
    Marreddy

  • How to delete a PO at header level - Restrict to a specific order type

    Hi,
    Deletetion of PO at header level is not recomended but still in my project they are using it to delete a particular PO type and should not allow to delete the other PO types. Recently Support Pack upgrade was done. After this activity deletion is not happening. Hope the relevent code got over writed with the original.
    Here creation and change of PO will be done from a third party system through IDOC. Deletion of PO at header level should be possible only through IDOC.
    Can some one give me the idea where(BAdI/Enhancement) we need to write the code to allow the deletion of PO of a particular type?
    Regards,
    Balaram Devineni

    Hope you are referring to "setting of deletion indicator at header level of PO" (EKKO-LOEKZ = 'L').  Standard method CL_PO_HEADER_HANDLE_MM->PO_CANCEL may be helpful (you may have to integrate this with IDOC processing function module).  Wiki post [Purchase Order Cancellation (Header) using ABAP Classes|http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseOrderCancellation%28Header%29usingABAPClasses] will be a good reference.

  • Freight condition value at header level for PO

    Hi
    In the PO header freight condition i have given 150RS.
    There are two items in the PO.
    Item1 qty 10 price 10rs/each
    Item2 qty 20 price 20rs/each
    Freight value for item1 is 30rs and unit price of the item is becomg 40rs/each
    Freight value for item1 is 120rs and unit price of the item is becomg 140rs/each
    I want 150rs to be apportioned among the two items like
    30rs for the 1st item
    120rs for the 2nd item
    But the unit price is gettiing increased abnormally.
    PLease suggest how to catter this.
    Regards
    Soumen

    Hi,
    To distribute the price across all the item then for that particular condition type tick the group condition and header condition in
    M/06
    If you tick the group condition then price will be distributed across all the items proportionally.
    Try this and see.
    Raj

  • Header level pricing condition error

    Hi Friends,
    In a PO, I have 5 line items. I am giving freight condition type at header level for the entire po as Rs. 500. But the system calculates the freight charge as 500*5=2500. The freight condition type FRB1 is a fixed charge condition type.
    The client wants the absolute freight charge should be for the entire PO.
    Please advice how to solve this issue.
    Thanks & Regards
    Satya

    Hi,
    the scales have nothing to do with this, they just allow different prices to be stored for different quantities.
    But have you had a look at the "qty relevant" flag on the condition type?
    Please do check the flags that are set, these do control the calculation.
    Also make sure that you are using a condition type that has the "header conditions" flag set on. If you choose one that has only the item condition set on this may not be correct.
    FRB1 (the one that you said that you are using) is an ITEM condition and should not be added to the header.
    Steve B

  • Adding Variant in Header Level in the Sales Order

    Field "Card Verification Value" (CVV) is part of the Standard from Support Package SAPKH47028 onwards. But if you like you can use a variant for screen SAPMV45A4440 and set
    field "Card Verif.Code" to invisible in this variant.
    This is the reply from SAP after implementing the new support pack. Now there is an additional field in VA01 that I am trying to remove.
    I can add the variant in Table Settings but that is on Item Level in the Sales Order (VA01). How do I do it in Header Level?

    Hi,
    Go to SHD0 ,write down the Transaction code , transaction variant then go to Tab " With Processing'.
    Now you will be in T Code VA01 ,press enter and you will get all the variants maintained in Header Level.
    Now you can activate / deactivate as per your requirement.
    Best Regards,
    Ankur

  • Taxcode need in Header level

    Hi,
    Our client requrement like this.
    One Purchase order have more then 200 line items with  VAT 12.5% only.We are configuration taxcode is requrement field in Purchase  screen layout.So the system ask that every line item should be maintain taxcode.
    So now Client said why not give taxcode in header level.thats is easy for us.one time WE are  maintain for all our 200 items rather then line itemwise maintain of taxcode.
    How will i maintain taxcode in header level?
    will u give me any ideas
    Regards
    kavi

    REPEATED THREAD
    hi
    it is not possible to have tax code at header
    but for ur problem what u can do is create a order without tax code at item level
    suppose u have 100 items
    now goo to first item >invoice tab click in field of tax code and then clikc the button of fast change (next to lock unlock button)
    now system will ask u for the value of tax code
    give tax code and then select for all items and execute
    all items will get this code only
    if ur clicnt still want to have at header level then ask ur ABAper to do some developement
    problems might create at time of retriving values for tax code
    regards
    KI

  • Freight condition calculated on header level , not at item level

    Hi,
    I am creating PO with 2 line items..
    mat X qty 1 price 100 INR
    mat Y qty 1 price 100 INR
    Now i have given freight as 500 INR in header level...
    My prob is freight is getting calculated based on number of  item level...
    It means if i have 2 item levels my freight is coming 1000 INR....
    it is adding based on line item.....
    but it shud come 500 INR....
    I want my freight to be added at header level......
    Utsav

    HI
    What will u do if in case freight shud be 500 + 500 = 1000
    So leave this condition as it is
    Goto Tcode M/06 ... and create a new condition for freight ... by copying the present condition type and then add it in pricing procedure
    But in "details "of this new condition type  put a tick mark against group condition and header condition.
    "To go into details of a condition type ... select the condition type and then click on lens button"

  • How to mantain entire freight charges in header condition or header level.

    Dear - all
    when am creating a purchase order i have 2line items with different materials. but i want to give freight charges as header level for which value will be distributed to each and every line item, so for that what will i do - which is my item condition and which is header condition.
             But i want to enter the entire freight charges in header level or in header condition.
             Pls suggest the procedure for mantaing the header condition for that i enter the total freight value in header level.
    thanks
    sunil

    hi
    u can do it by checking the tick of header condition in the respective condition
    copy the condition FRA1-Freight %  or  FRB1-Freight (Value) in M/06
    then
    in changes which can be made coulumn u will get tick of header ,just tick it and add this condition to ur schema in M/08
    hope it help

  • Freight Calculation based on the net value of the Line item

    Hi SAP Gurus,
    I have one requirement for Freight calculation(Sales order is created through an IDOC) :
    In the idoc,we will receive a freight dollar amount - which will be the total amount of freight.(example 100)
    We will also receive sales dollar for each line item ,which is then passed to the pricing procedure, for a total amount of sales for that Sales order.
    (examples below, for a total of 1500)
    The 100  is to be posted to a freight G/L account.
    The 100 is further divided by each profit center  of the materials on the Sales order.
    The freight is split out amongst the  profit center , based on the net value of the line item.
    Freight value to be allocated = Line item value/total value of the sales order * Freight amount.
    Total of the sales order =1500
         Line item value     Freight value calculation     Profit center
    Material A:      800          800/1500*100  = 53     Profit center A
    Material B:     500          500/1500*100  = 33     Profit center B
    Material C:      200          200/1500*100  = 13     Profit center C
    Please let me know how to achieve this functionality in pricing procedure or what changes i need to make in Freight condition type.
    Thanks in advance,
    Bhakar Saha

    Were you able to resolve this issue of allocating freight costs to line items/profit centers using the net value of the line items?

  • Freight charges in PO at header level

    Hi Friends,
    I have created a PO having 10 line items. I dont have individual freight charges for each line item.I have total freight charges for the whole PO. I have defines a freight charge at header level.I want the system should devide the whole freight charges among the line items as per the value. But when I enter any value in the header freight condition type, its simply multiplying the freight by 10. The system is not dividing the freight charges amonth the line items as per their valuation.
    Please guide me and suggest how to do the settings in customization so that system should divide the freight charges as per line item value.
    Thanks & Regards
    Satya

    HI,
    Go to M/06.select the frieght condition type and tick the group condition indicator and Group condition routine as 1 Overall document .and then enter condition value at header level in PO.
    reward if helpful.
    Regards,
    Chetan.

  • Freight calculation

    Hi,
    The freight condition type ZFF1 is an item condition and calculation type is B - Fixed amount. I have maintained condition record with scales as , if the net value is <=300 Eur then the freight charges should be 30 E fixed.
    For the order of value 280 Eur, The freight condition is picking the 30 Eur perfectly in the amount column but in the condition value column in pricing its giving the sum of all the freight charges calculated individually for the items which come to 60 Eur
    Please clarify on
    when i checked in the analysis the system says " The condition record is found but not set"
    My question is what calculation the system is doing to calculate the freight charges individually for the items and where are the configuration settings done for that.
    and also I have raised the same sales order again and checked,  now the system is showing perfectly but for the first item the freight charges is 59.99 and for the second item the freight charges is 0.01 i dont understand on what basis system is calculating the freight charges.
    Thanks in advance

    Hi Nina,
    Freight to my knowledge should be header condition. However assuming that it is item related condition(u may use soem c.type as freight c.type) i am answering this.
    Fro freight value based on dollars, you have to write a routine as there is no other way. Condition types are determined only at item level automatically. If you want to determine some value based on the total order which can be of many items, then the only thing is to write a routine.
    For this write a reqmt routine and mention that the total order value should be less than $100( in our example case) for the condition records to be fetched.
    Then for this condition type, create condition records.(Remember that the condition table should not be of some item level fields, it should be based on some header level data like Hdr ship to party, sold to party etc)
    In case of surcharge, you can do the same but teh reqmt shd be based on the total number of material items( Total of items of various materials).  Make sure that the material units shd not be different, eg. one being crate, and other being litres. This can lead to confusion in the logic.
    If the total number of items is less thatn 100, then
    Create condition records at ITEM LEVEL and you can populate the details.
    Pls lemme know if you need more info.

Maybe you are looking for

  • Open PDF with disable save as and Print option

    Hello, I want a pdf viewer to use it in my website with disabling save as and print ,i mean user only can see my books online.I need something like "books.google.com" viewer. It is possible thru java programming or with the help of any open source. P

  • Why do my em dashes separate into two en dashes only in digital (ebook) format?  How do I stop that?

    I work for a publisher and we use InDesign to set up our print files to be uploaded (usually in PDF format). Then I create a new file for the ebooks, removing extra pages, marking the table of content entries as internal hyperlinks, etc. Since the Ki

  • IPod Classic 120gb completely unusable.

    I bought my Classic in late(ish) 2008, I use it every day, it's had a lot of use, but it's been looked after really well, and it hasn't skipped a beat... however recently there has been some intermittent problems with transferring files over. It woul

  • Push messages from business logic into backing bean

    In my simple web application a table with the contents of a database table is shown to the client. Now I want this table in the browser to be updated each time the db table is updated. In my business logic a jms message is fired to a specified topic

  • What should be done to include the current controlfile in the database copy

    Hi When trying to create a copy of the database it always fails copying the controlfile What should be done to include the current controlfile in the database copy with the %b format RMAN> backup as copy database format 'd:\backup\%b' 2> ; Starting b