FMS On Header Level UDF

Hi Experts.
I want to set up approval procedure based on the sales warehouse.
Sales Employee1 is only allowed to sell from WHS1. If the sales employee has to sell from a different warehouse, an approval has to be triggered.  I want a header level UDF the gets the Warehouse selected on the Invoice. If WHS2 is selected the UDF is updated and the approval procedure triggered.
Please help
Regards.

In a header level  FMS you can not access the row level data. (Only the first line.)  So you can not move the warehouse code automatically to the header UDF. But you can force the user set a header level UDF to sign that this is a critical transaction. This can be done writing some code into the SBO_SP_TransactionNotification stored procedure.
1. Create a header level UDF e.g. named ForApproval with possible values Y and N, with default value N.
2. Write code in the SBO_SP_TransactionNotification stored procedure, that signals an error message u2018You should set ForApproval to Y!u2019  if U_ForApproval=u2019Nu2019, the originating user is not allowed to make transaction from this warehouse and there is any line from this warehouse.
3. Set an approval procedure according to the header level ForApproval field. The user approving the document can add then the transaction.
(To force setting the ForApprova flag insert the code in your  SBO_SP_TransactionNotification stored procedure after the line
--     ADD     YOUR     CODE     HERE )

Similar Messages

  • Formatted search on header level UDF

    Hi All
    How do you call a UDF at Warehouse header level into purchase order row level?
    Thanks
    SV Reddy

    HI,
    and what if the Warehouse code is located in a UDF at header level of the marketing document ??  I mean, how can we access a UDF value in a FMS ?
    We tried the following, but it didn't work :
    SELECT T0.OnHand
        FROM OITW T0
        WHERE T0.ItemCode=$[$38.1.0]
        AND T0.WhsCode=$[$U_Nwr_WH.0.1]
    And it seems that the UDF do not have number assigned to it so we can't use the following syntax
    $[$99.0.1]
    thanks,
    Luce
    Edited by: Luce Veilleux on Nov 26, 2009 4:32 PM

  • Marketing Document Header Level UDF - Table Holding the Categories

    Hi All,
    I need the name of the table where categories of udf at header level of marketing document is stored.
    I cheked the table CPRF but it does not show the category code in which the udf will be displayed in the form,
    please help,
    Thanx in advance,,,,

    Hi
    If you need category codes and descriptions, they are stored in the CUDC.
    Thanks,
    Gordon

  • Auto fill Row level UDF from Header Level UDF

    Hi,
    I have a header UDF (U_BU) and Row UDF (U_BU).
    Each time I add a row (item or service type) I want the row UDF to be loaded with  the header UDF data, using a formatted search on the row UDF.
    I also want the user to be able to change the ROW UDF if it is not meant to be the same as the header.
    Could someone help on this?
    Kind Regards,
    Eric

    Hi Eric,
    Try this,
    ->> Assign this FMS in UDF(row level) on A/R Invoice.
    ->> Auto Refresh of Item Description.
    SELECT $[OINV.U_BU]
    or
    for example, use variable
    (because this method of FMS will work all marketing doc.)
    SELECT $[$33.0.U_BU]
    ->> Assign the FMS in UDF on item rows.
    1. Goto the UDF and Click ShiftAltF2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select Item Description.
    6. Check the Display Saved Values.
    Regards,
    Madhan.

  • Update UDF on the header level

    I have created two UDF's on a marketing document on the header(Title Level). I have created two different formatted searches such that on the first UDF after adding data it fills relevant data on the second UDF. However this is not happening unless i manually press shift+F2 on the second field thereby updating the data even when the first UDF data changes and I have set the option of refresh regularly.
    Kindly advice.

    Hi,
    The problem is with the 2nd FMS.
    If you want to automatically reference a header level UDF in your FMS then you can enter the table name for the form you are in.  For example, if this formatted search runs on the Sales Order screen then:
    SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode = $\[ORDR.U_TrpCode\]
    Alternatively if it is an A/R Invoice screen then:
    SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode = $\[OINV.U_TrpCode\]
    Otherwise you have to manually press Shift F2 as you currently do.  By using the query i mentioned this automatically updates the field fine.
    Regards,
    Adrian

  • UDF at header level will not auto refresh before & after adding the invoice.

    Hi All,
    I have a FMS query in the UDF at AR Invoice header level. I have set the FMS query to auto refresh when tax rate field changes but the UDF doesn't auto refresh when there is a tax code in the document.
    I will need to add the invoice first then open the added invoice and press shift+F2 to get the calculated amount in the UDF to update the invoice.
    How to get the UDF to auto refresh whenever the tax code has changed? Or after the invoice has added?
    The FMS query:
    SELECT sum(T0.[TotalSumSy]) FROM INV1 T0 inner join OINV t1 on t1.docentry = t0.docentry WHERE T0.VatGroup in ('SR','DS','AJS') and t1.docentry = $[OINV.docentry]
    Thanks & BR,
    Leng

    Hi,
    I solved the problem following the steps in SAP note 633285 - Printing the total Vat amounts in each Vat group, https://websmp130.sap-ag.de/sap/support/notes/0000633285
    In order to print  in the  order  the Vat amount  in each vat group Please perform  the followed stages:
    Go to Tools (in the SBO tool bar ) and chose Manage User Field
    In Marketing Documents (Rows) add new fields according to the Num of the vat groups that you are using in Orders (e.g. A1, A2 ,A4) The type : Units and Totals  - the Structure: sum in the order each column will represent the vat amounts in the line but only for certain  Vat Group
    in order that each column will display the vat amount in the line only if it belong to certain Vat group we attach a query to each column: (e.g. we have 3 columns : A1, A2, A4) .the queries are;
    SELECT $[$38.82.NUMBER]  WHERE $[$38.18.0] = 'A1' FOR BROWSE  SELECT $[$38.82.NUMBER]  WHERE $[$38.18.0] = 'A2' FOR BROWSE SELECT $[$38.82.NUMBER]  WHERE $[$38.18.0] = 'A4' FOR BROWSE Now each column will display the vat amount only if it in the relevant vat group
    in the order document printing template you need to add those Vat column in our example we add 3  data fields : the file: Order - Rows , the Field: A1/A2/A4 - you can hide (un visible ) this columns as needed
    in the Repetitive Area Footer add a calculation field for each vat groupthe Type: Column Total , the Column: Order; A1/A2/A4 in each calculate field you will get the sum amount of the vat in the relevant Vat group. (in  addition you can add text fields with a relevant description for the calculation fields)
    Thanks & BR,
    Leng

  • Display row level value in a UDF at header level

    Hi,
    I would like to display the sum of price of a sales document which is in line level to a added UDF at header level using FMS.
    Is there any solution.. let me know.
    Thanks.

    Hi,
    To achive what you want with a FMS, like Gordon said, only on the 2nd visit to the document you can fire a FMS to get the values from the database data.
    You can have what you want if you use SDK to create a small Add-on for this.
    Regards,
    Augusto

  • Message Mapping Issue on header level

    HI all,
    I am doing File to IDOC scenario where I am having issue wiht mapping :
    Flat File
    Row -0Unbound
    FieldA1..1
    FieldB1..1
    IDOC
    --Segment
    ---Field1
    ---Field2
    Segment1
    Field11
    FieldA is Order number.. IDOCs will generate up on order numbers change... FieldB is discount... If Discount is avaliable in any of the order number then I need to Pass YES orelse NO... Segment is a header segment where I need to pass whether discount is YES or NO... Suppose there are 5 rows of same order with discount in 4 row then I need to pass YES if discount doesnt avaliable in all 5 rows then NO..
    Row
    --FieldA<123>
    --FieldB<>
    </Row>
    Row
    --FieldA<123>
    --FieldB<>
    </Row>
    Row
    --FieldA<123>
    --FieldB<10>
    </Row>
    Row
    --FieldA<222>
    --FieldB<>
    </Row>
    Row
    --FieldA<222>
    --FieldB<>
    </Row>
    IDOC
    --Segment
    ---Field1<123>
    ---Field2<YES>
    Segment1
    Field11
    </IDOC>
    IDOC
    --Segment
    ---Field1<222>
    ---Field2<NO>
    Segment1
    Field11
    </IDOC>
    Any inputs how to get value on header level? I tried but I am able to get only first value..not drilling down to each value depending on order number?
    Thanks
    Rajeev.

    Hi Prakasu,
    Its working but there is one issue: 
    If one fo the discount value is 99.00 then I need to pass NO.. How can I achieve this? I used the UDF but it is taking only the highest value which is 99.00 but even if it is 99.00 I need to pass NO..
    Suppose if first row discount is 99.00 and second row its 2,00 then I need to pass YES as it has 2,00 in the second row..
    Row
    --FieldA<123>
    --FieldB
    </Row>
    Row
    --FieldA<123>
    --FieldB<99>
    </Row>
    Row
    --FieldA<123>
    --FieldB<>
    </Row>
    Row
    --FieldA<222>
    --FieldB<8>
    </Row>
    Row
    --FieldA<222>
    --FieldB
    </Row>
    IDOC
    --Segment
    ---Field1<123>
    ---Field2<NO>
    Segment1
    Field11
    </IDOC>
    IDOC
    --Segment
    ---Field1<222>
    ---Field2<YES>
    Segment1
    Field11
    </IDOC>
    First row value is 99 and Null it has to give NO as if discount has 99 then it should pass NO.. in the second order first row is 8 and second row is null.. it should give YES but it is giving NO becuase if is taking only the last value in the Context change..
    Any inputs how to achieve this?
    Thanks
    Rajeev.
    Edited by: rajeev raj on Nov 23, 2009 2:52 PM

  • How to show unit price total to document level UDF

    Hi,
    In sales order document I have to show the total of unit price of all items in document level UDF.
    Is it possible by using FMS? How?
    FMS Query    Select SUM($[$38.14.Number])  is not worked for this issue.

    Hi Swapnil,
    This is the limitation that you cannot bring row level details on document level field.
    If you want so then you have to use SDK or you can use Type-->Subtotal option to check the row total.
    Regards,
    Rahul

  • Purchase Order Total Amount at Header level and Report Execution

    Dear Experts,
    Here by i am facing problem with Purchase Order Total amount.
    I have local Pricing Procedure for price stipulations (like discounts, Freight, packaging). the calculation at item level is correct. tax calculation is done by tax code. The total PO Price is including all items in PO and tax amount. But at header level conditions net value is showing only gross price.
    How to pick up total price including tax amount at header level conditions?
    Please provide me solution on it ?

    Dear Experts,
    Here by i am facing problem with Purchase Order Total amount.
    I have local Pricing Procedure for price stipulations (like discounts, Freight, packaging). the calculation at item level is correct. tax calculation is done by tax code. The total PO Price is including all items in PO and tax amount. But at header level conditions net value is showing only gross price.
    How to pick up total price including tax amount at header level conditions?
    Please provide me solution on it ?
    Edited by: Kiran Mujumdar on Feb 23, 2009 7:08 PM

  • PO number prints only if it is at header level not for item level

    Hi All,
    I am not able to print the PO number in my order acknowledgement and COA printout when I enter the PO number in the sales order at item level of only. It prints fine when it is at the header level.
    Please assist.
    Thank you,
    Shanu Jain

    Hi,
    BSTKD Field in the VBKD is dependent on two things . IF the Header PO Number is same as the Item number if u change at Header level it will be changed at all items level also. If both are diff then if u change the PO Number at Header level it will change PO numbers of the Items which is having same value as Header Po Number otherwise it wont change the Item PO Number .
    Ex " Order Number 1000 is having PO Number at Header Level is PO1. And the sales order is having Item 010 and 020.
    IF Item 010 and 020 is having PO1 at item level if u change the value of PO1 at header Level if will be applicable to items 010 and 020.
    If Item 010 is having Po Number PO1 and 020 is having PO2, if i change value of PO number at header to PO3 then it will change Item 010 PO Number to PO3 and Item 020 PO Number will be same as PO2.
    Try to Take The VBKD - BSTKD where Item Number POSNR is blank that means Header PO Number .
    IF u want Item Po Number then pass the item number in POSNR and get it.
    Regards,
    Srinivas.

  • Sale order close at header level

    Hi
    How can I cose a sale order completely at header level having more than one line items so that no schedule line can be used for delivery.
    Regards
    Rajesh

    Dear Mr.G. Lakshmipathi
    Thanks for your answer.I know this option but it does n't fulfill my requirement.
    There are more than one sale orders of the same material at a time for different customers having daywise schdule.System confirms the complete qty.in sale order used in first.While I need partely qty.to be sale to the other customer also.How can I transfer the qty.confirmed in first sale order to other sale order.
    Thanks
    Rajesh

  • Additional Data in Header Level for ME51N / ME52N / ME53N

    Dear Gurus,
    I have one requirement related to apply enhancement for additional fields in purchase requisition header level.
    After searching a lot , I dint found any solution for this.
    Does anybody have any solution for this.
    Regards,
    Shibashis.

    I need to add on Tabstrip "Account assignment" for fields
    CO Area and Cost Center text field description ( right side ) for each one.
    How can I do this? Thanks in advance.

  • Billing plan (Downpayment) for saved and open sales orders at header level?

    Hi gurus,
    I have configured billing plan in my SD environment at Item Level.
    I want to change it to header level.
    Questions:
    1- When I make the changes to update the system to have billing plan at header level for future sales orders, is that possible for me to change all my saved orders and open orders with the new settings so that I can also have those saved and open orders with a billing plan at item level?
    2- If that scenario is not possible, could we for example copy the data of a previously saved or open sales order into a new sales order with the new customizing (Billing plan at Header level?)
    Thanks for your input
    Kind regards
    Chris

    Hi
    I am afraid you cannot do that converstion for the existing orders. BP at header level are enabled at teh document type level, while BP at item level is done at item category. So both are independent. Mostly it is advisabel to use BP at item level only.
    If you are already using item level BP, and want to mvoe to header BP, then only future transactions can be executed with BP at header level. Existing item level BPlans will remain so in the system.

  • 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

Maybe you are looking for

  • After updating to Windows 8.1, Windows Explorer crashes.

    Hello, I have recently updated from Windows 8 to Windows 8.1. When it finished the install and reboot, it went to my desktop where my background image was gone, Kaspersky Pure 3.0 was gone, and Windows Explorer crashes every time it is opened. The ot

  • After enabling the Built-in Administrator account, it is not shown on Welcome screen

    Hello, I have Windows 7 Starter SP1. I have previously successfully enabled and then logged on, to the built-in administrator account,  and then when I had finished using it, disabled it again. Unfortunately today, I found that when I enabled the bui

  • Oracle APEX 4.0 no images

    Hello to everybody after i have run @apexins SYSAUX SYSAUX TEMP /i/ the Application will be opened but there are no images. What is wrong? Need i copy something? Where is the directory /i/ ? Regards, bladepit

  • Topic: Who can explain how EJB connect to Oracle9i DB with DataSource?

    I have taken 4 days into this problem. I am developing EJB with J2EE1.3 and Oracle9i DB, I can connect to DB in code with DriverManager. But I want to use DataSource to connect to DB. I failed, I can not get new way to resolve it when I after try to

  • MYSQL master / details tables

    I have managed to connect to single tables and display / edit the data. I come from a Delphi background and was wondering if there a any 'components' that allow you to specify the relationships between the tables / grids. ie click on first grid1 cust