Adding values for a single customer

Hi Everybody,
I am facing a programming issue. I have to do something like this:
For a each customer, for all open items for that customer, I have to add the amount due at every period in aging in Accounts receivable. So for example, if I have two customers: A and B and
A has 5 open items
B has 3 open items
for each open item there is an amount due for both customers. So what i have to do is add for A 1+2 = amount 1.
amount 1 + 3 = amount 2, amount 24 = amount 3, amount 35 = amount 4.
Similarly for B also I have to do the same thing. Right now my amount are getting added up into one single value at each line of the table. So for all customers it is just getting added in every row of the table and not seperately for every new customer.
Can somebody suggest something or give some example?
Please help.
Thanks & regards,
AM

I'm not sure I understand what you are trying to do. Is it something like:
REPORT ztest.
TABLES: bsid.
PARAMETERS p_bukrs LIKE bsid-bukrs.
SELECT-OPTIONS s_kunnr FOR bsid-kunnr.
DATA: BEGIN OF itab OCCURS 0,
        bukrs LIKE bsid-bukrs,
        kunnr LIKE bsid-kunnr,
        under_30_amt LIKE bsid-dmbtr,
        under_60_amt LIKE bsid-dmbtr,
        under_90_amt LIKE bsid-dmbtr,
        over_90_amt  LIKE bsid-dmbtr,
      END   OF itab.
DATA: under_30_date LIKE sy-datum,
      under_60_date LIKE sy-datum,
      under_90_date LIKE sy-datum,
      over_90_date  LIKE sy-datum.
under_30_date = sy-datum - 30.
under_60_date = sy-datum - 60.
under_90_date = sy-datum - 90.
over_90_date  = sy-datum - 30.
SELECT bukrs kunnr bldat dmbtr
  INTO CORRESPONDING FIELDS OF bsid
  FROM bsid
  WHERE bukrs = p_bukrs
    AND kunnr IN s_kunnr.
  CLEAR itab.
  MOVE: bsid-bukrs TO itab-bukrs,
        bsid-kunnr TO itab-kunnr.
  IF bsid-bldat > under_30_date.
    MOVE bsid-dmbtr TO itab-under_30_amt.
  ELSEIF bsid-bldat > under_60_date.
    MOVE bsid-dmbtr TO itab-under_60_amt.
  ELSEIF bsid-bldat > under_90_date.
    MOVE bsid-dmbtr TO itab-under_90_amt.
  ELSE.
    MOVE bsid-dmbtr TO itab-over_90_amt.
  ENDIF.
  COLLECT itab.
ENDSELECT.
LOOP AT itab.
  WRITE: /001 itab-bukrs,
              itab-kunnr,
              itab-under_30_amt,
              itab-under_60_amt,
              itab-under_90_amt,
              itab-over_90_amt.
ENDLOOP.
<i>Caveats</i>
I'm not sure what date you should use for aging. I used the document date. Maybe it's the baseline date. Maybe it's something else.
Collect is inefficient. You might want to do it another way.
I may be way off base - you may be doing something else entirely.
Rob

Similar Messages

  • Any way to pass Multiple Values for a single Label in the Parameter?

    I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610"
    One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter. 
    PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data.
    Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610.
    QUESTION:
    Any way to pass Multiple Values for a single Label in the Parameter?
    I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting
    it correct.
    I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….
    Note: We are using Report Builder 3.0

    Based on my experience, there's no way to 'intercept' the query that gets passed back to SQL Server, so a Split wouldn't work.
    Try creating either a function or stored procedure using the code below (compliments to
    http://www.dotnetspider.com/resources/4680-Parse-comma-separated-string-SQL.aspx) to parse the string: 
    CREATE FUNCTION dbo.Parse(@Array VARCHAR(1000), @Separator VARCHAR(10))
    RETURNS @ResultTable TABLE (ParseValue VARCHAR(100))AS
    BEGIN
    DECLARE @SeparatorPosition INT
    DECLARE @ArrayValue VARCHAR(1000)
    SET @Array = @Array + @Separator
    WHILE PATINDEX('%' + @Separator + '%' , @Array) <> 0
    BEGIN
    SELECT @SeparatorPosition = PATINDEX('%' + @Separator + '%', @Array)
    SELECT @ArrayValue = LEFT(@Array, @SeparatorPosition - 1)
    INSERT @ResultTable VALUES (CAST(@ArrayValue AS VARCHAR))
    SELECT @Array = STUFF(@Array, 1, @SeparatorPosition, '')
    END
    RETURN
    END
    Once created you can do things like this:
    SELECT * FROM Parse('John,Bill,David,Thomas', ',')
    SELECT * FROM (SELECT 'John' AS TestName union select 'David' AS TestName) AS Main
    WHERE TestName IN (SELECT ParseValue FROM dbo.Parse('John,Bill,David,Thomas', ','))
    This is what your SQL query would probably look like:
    SELECT OperationID, OperationName FROM dbo.Operations
    WHERE AreaID IN (SELECT ParseValue FROM dbo.Parse(@Area, ','))
    You may need to fiddle around with the Separator depending on whether SQL Server inserts a space between the comma and next value.

  • Entering mulitple values for a single user parameter

    Hello,
    Can anyone explain to me how to allow multiple values for a single parameter?
    For example, say I want to allow the report to display a list of employees based on their employee id. I want to allow the user to enter mulitple
    employee id's into a single field to get their report. SO the user would enter "241, 459, 832" to return the list of those 3 employees. I have the SQL set up below, but obviously I need to set up something different to break it out into 3 separate values. Any help would be greatly appreciated!
    SELECT * FROM EMPLOYEE
    WHERE EMPLOYEE_ID IN (:P_EMP_ID)

    Hi,
    Another way to do this is to use the lexical parameter, but then you have to create the parameter form in Forms. Your SQL would look like this for example:
    select * from emp where empno is not null &empno
    where &empno is a lexical parameter.
    Then on your parameter form you would have a text field F_empid, say 200 character long, allowing the user to enter multiple values separated by a ",".
    Then in the trigger that calls the report you would create a parameter list, and a variable that holds the values read from the form, this variable is where you define the value to be passed to the report's lexical parameter. For example:
    declare
    v_empid varchar2(200); (consistent with the length of the lexical parameter in the report).
    begin
    v_empid:='and empno in ('||F_empid||')';
    then you pass v_empid to &empno in the call to the report.
    This method works well. Good luck.

  • Passing multiple values for a single field in URL to call sap Transaction

    Hi All,
    I need to pass multiple values for a single field to SAP transaction .
    means if i have say a field "Date" which can contain more than one value, <b>but its not a range which has two fields</b> . How is it possible.
    Let me know pls.
    Regards,
    Sirisha.R.S.

    Hi Satyajit,
    I need to call a transaction with multiple values which gives me the report based on those values.
    So I need to pass multiple values for a single parameter.
    I hope u got it.
    Regards,
    Sirisha.R.S.

  • How to create Multiple Address for a single customer

    Respected Members,
    In tcode Xd01 we create on customer but there we can maintain only one address but sometimes a scenario can be that single customer can have different address .
    How to do that.Any exit is available to create multiple address with creation of single customer.
    This provision is given while creating a Business Partner.Tcode is BP .In this Address Overview tab is there and you maintain multiple address to single Busines partner.
    Same thing can we do for the customer.
    Any solutions or suggestions,please give me your support.
    Thanks

    Hello Manish,
    Unfortunately Customers have only one address. However you can use contact persons to store different addresses, or (in the Sales view) you can assign other partner functions with different addresses (e.g. one customer acting as the Sold-to partner may have different Ship-to partners).
    If these options do not meet your requirements, you could extend the customer master data with your own functionality and enhance transaction XD01 with your own screens for holding alternate addresses.
    Regards,
    John.

  • How to place multiple characteristic values for a single Report line

    hi friends,
          I want to display a report with multiple characteristc values in different columns for each instance, For example there are 2 instances and they have multiple characteristics , so all characteristics of each instance  should be displayed in multiple columns in one by one in the same row.
    Thanks in advance.
    RK
    Message was edited by:
            RK

    Hi RK,
        Try this it may help you for multiple values for one instance....
    *Type-pools
    TYPE-POOLS: slis.
    Data declarations.
    DATA: BEGIN OF t_vbak OCCURS 0,
    vbeln TYPE vbeln,
    bstnk TYPE vbak-bstnk,
    erdat TYPE vbak-erdat,
    kunnr TYPE vbak-kunnr,
    END OF t_vbak.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln TYPE vbeln,
    matnr TYPE vbap-matnr,
    netpr TYPE vbap-netpr,
    waerk TYPE vbap-waerk,
    kwmeng TYPE vbap-kwmeng,
    meins TYPE vbap-meins,
    END OF t_vbap.
    DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
    DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
    DATA: v_repid TYPE syrepid.
    DATA: s_layout TYPE slis_layout_alv.
    DATA: v_tabname TYPE slis_tabname.
    DATA: t_events TYPE slis_t_event.
    start-of-selection event.
    START-OF-SELECTION.
    v_repid = sy-repid.
    Get the fieldcatalog for the first block
    PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.
    Get the fieldcatalog for the second block
    PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.
    Get the data for the first block
    SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
    INTO TABLE t_vbak
    FROM vbak WHERE vbeln > '0060000100'.
    Get the data for the second block
    SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10
    ROWS
    INTO TABLE t_vbap
    FROM vbap WHERE vbeln > '0060000100'.
    init
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
    i_callback_program = v_repid.
    First block
    v_tabname = 'ITAB1'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    is_layout = s_layout
    it_fieldcat = t_fieldcatalog1
    i_tabname = v_tabname
    it_events = t_events
    TABLES
    t_outtab = t_vbak.
    Second block
    v_tabname = 'ITAB2'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    is_layout = s_layout
    it_fieldcat = t_fieldcatalog2
    i_tabname = v_tabname
    it_events = t_events
    TABLES
    t_outtab = t_vbap.
    *Display
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    FORM GET_FIELDCAT1
    Get the field catalog for the first block
    FORM get_fieldcat1 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'VBELN'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Customer purchase order.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'BSTNK'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'BSTNK'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Creation date.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'ERDAT'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'ERDAT'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Customer
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'KUNNR'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'KUNNR'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    ENDFORM.
    FORM GET_FIELDCAT2
    Get the field catalog for the second block
    FORM get_fieldcat2 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'VBELN'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Material number
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'MATNR'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'MATNR'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Net price
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'NETPR'.
    s_fieldcatalog-cfieldname = 'WAERK'.
    s_fieldcatalog-ctabname = 'T_VBAP'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Currency.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'WAERK'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'WAERK'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Quantity
    s_fieldcatalog-col_pos = '5'.
    s_fieldcatalog-fieldname = 'KWMENG'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'KWMENG'.
    s_fieldcatalog-qfieldname = 'MEINS'.
    s_fieldcatalog-qtabname = 'T_VBAP'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    UOM
    s_fieldcatalog-col_pos = '6'.
    s_fieldcatalog-fieldname = 'MEINS'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'MEINS'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    ENDFORM.
    Plz Reward points if contents are useful,,,
    Regards,
    Mandeep.

  • How to pass multiple MDX values for a single parameter into a drill-through report?

    I'm thinking this will be an easy question for any experienced SSRS/MDX developers, at least I hope so!  I've created a report that gives the user the option to choose viewing data for the current/active week, or YTD.  Depending on which link the
    user selects, the report simply calls itself and needs to pass in the parameter value for Active week.  If it's active week, the parameter value will simply be "true".  If it's YTD, the parameter value needs to be both "True" and "False" so the current
    week's data is accounted for as well.  I've set everything up except for the final step, and I have no idea what to type into the Value field below.  I've tried different things: false, as you see below (it errors saying I'm missing the parameter
    value), the value in MDX format: =[School Dates].[Active Week].&[True] (it said I was missing a bracket), a 1 instead of the word true (again, missing a parameter value).  Nothing is working.
    So my question is kindof two-fold: 1) how do you pass in the value at all and 2) more specifically, how do you pass in multiple values (both true & false) ??

    I'm sorry for being so dense, but I'm not quite following, although what I've tried makes me think if I can follow you, it will work :)
    To answer your initial questions, you are correct with both your assumptions:
    1) detailType is the parameter that specificies YTD/Weekly, this is a "report defined" parameter that I am using to determine which Row Group to display (either YTD or Weekly)
    2) SchoolDaysActiveWeek is the parameter that is being set to either true or false -- this is a field in the cube that states whether that record is for the current week or not
    So in following your instructions, well that's the problem I'm not quite following :)
    1) When you say Delete the SchoolDaysActiveWeek parameter from the report only, do you mean to mark the parameter as Hidden?  If so, I've done this.
    2) I'm not quite sure where to use the statement you provided me.  You said to put it in the dataset, but I don't know which dataset.  I assume you mean the "main" dataset (as opposed to the hidden dataset that gets generated when you mark a field
    as a parameter).  If this is the case, the only place I could see that would allow you to use such a statement is in the Filter section of the properties.  I tried this, and it did not generate any errors, but it also kept my report groups from displaying
    -- it just showed a blank report, so I think it probably wasn't bringing back any rows to populate them with.
    I also tried going into the Expression section for the SchoolDaysActiveWeek parameter in the second screenshot and placing the statement there.  When I did this and ran the report, I would get the following error:
    The 'SchoolDaysActiveWeek' parameter is missing a value
    So what am I missing!? 
    Also, thanks for taking the time to respond!!

  • Querying up AR Customer OA page in read-only mode for a Single Customer

    We are building a Custom Form in which associated Customer <defined in AR> would be queried up.
    Now we want to give an option to the User to view the complete details of the Customer. We would be giving a menu option in Tools 'View Customer' thru which he would see the Full Customer Details. <AR Customer OA page>
    We have two requirements
    1> The Full Customer Details should show up in Standard OA Customer Page the moment page comes up. The user should not be required to query the details.
    2> It should be read-only and user should not be able to update any field.
    How can we achieve this requirement? I did some RnD but did not see any place in EBS where we display the Customer Page in read-only mode and that too quried up for one particular customer.
    Thanks
    Arun

    Hi Arun,
    Please let me know if find any solution for this. We have a similar scenario in which we need to call the customer Page with all the inforamtion populated, related to one customer.
    Thanks in advance,
    Mannuru

  • Output determination failed for a single customer(order confirm thru mail)

    Hi,
    i n sales order while we save a confirmation mail goes to cutomer.but in case of one customer it failed in output in  edit option it is showing yellow signal and email id also maintained in cutomer master .for all other customer its ok.i m new to this could you plz suggest me and provide me the settings .
    Reagrds,
    Debesh

    Hi Debesh,
    Please go to NACE t-code in order to configure output determination, if customer master is ok for output control . in that screen, Firstly you should select V1 output control for order confirmation ,and go in your output condition records for your output control adn create a condition record for your access sequence (ıthink there is no condition record or correct condition records for your specific customer.)
    When creating condition records, you should define customer number+ SP- partner function +message trn. medium-5, dispatch time- periodic job, immediate, or etx...
    I hope you will solve this proble after output condition records for your spesific customer correctly.
    Regards,

  • Setting Default values for field using custom.pll

    Hi All,
    I have an rquirement to set the default values on Meterial Tranasction screen for some condition
    I tried it in both ways via Form Personalization and using custom.pll
    i m using the following code in custom.pll
    form_name      varchar2(30):= name_in('system.current_form');
    block_name varchar2(30):= name_in('system.cursor_block');
    trx_type           varchar2(30);
    subinv                varchar2(30);
    begin
    if form_name='WIPTXMAT' and block_name ='MTL_TRX_LINE' then
    if event_name ='WHEN-VALIDATE-RECORD' then
         trx_type:=name_in('WIPTXMAT.TRANSACTION_TYPE');
    if trx_type ='WIP Return' THEN
         copy(10,'MTL_TRX_LINE.TRANSACTION_QUANTITY');
              copy(10,'MTL_TRX_LINE.NUMBER_OF_LOTS_ENTERED');
              sinv:=trim(name_in('MTL_TRX_LINE.SUBINVENTORY_CODE'));
              if sinv is null then
                   copy(subinv,'MTL_TRX_LINE.SUBINVENTORY_CODE');
                   copy(fr_locator,'MTL_TRX_LINE.LOCATOR');
                   FND_MESSAGE.SET_STRING(sinv);
                   FND_MESSAGE.SHOW;
              end if;
         end if;
    end if;
    end if;
    end event;
    Problem is that default values are getting set but not for all rows . if there are 4 records then values are set for only first 2 rows and if there are 2 rows then defaults are set for 1st row only.
    Same behaviour happens when i do it via form personalization
    i couldn't understand the behaviour of WHILE-VALIDATE-RECORD event..
    Please provide some suggestion on it. its really urgent.
    Thanks in Advance
    Renu

    Works Now...

  • How to get Multiple Values for a single Variable in BPS.......

    Hi Gurus:
    I have a layout for planning, where I can plan for 5 days of the week. I also have a day column (yesterday) where I have the actual values. Users want to edit/foecast the next 5 days values. I am using a Variable to get the Date column which uses the System Date. However, since I am getting just one date in the Function Module (Code given below), the remaining days are greyed out and I can not enter the forecast values. I would like the same variable to get a series of dates in the same function module. What changes do I nee dto make in the ABAP code so that the remaining columns (Date) becaoe available for editing??
    The FM code I have to get "Today's Date" is as follows:
    FUNCTION ZCSHFL_GET_TODAY.
    ""Local Interface:
    *" IMPORTING
    *" REFERENCE(I_AREA) TYPE UPC_VAR-AREA
    *" REFERENCE(I_VARIABLE) TYPE UPC_Y_VARIABLE
    *" REFERENCE(I_CHANM) TYPE UPC_Y_CHANM
    *" REFERENCE(ITO_CHANM) TYPE UPC_YTO_CHA
    *" EXPORTING
    *" REFERENCE(ETO_CHARSEL) TYPE UPC_YTO_CHARSEL
    data: ls_charsel type upc_ys_charsel.
    ls_charsel-seqno = 1.
    ls_charsel-sign = 'I'.
    ls_charsel-opt = 'EQ'.
    ls_charsel-CHANM = I_chanm.
    ls_charsel-low = sy-datum.
    insert ls_Charsel into table eto_charsel.
    ENDFUNCTION.
    I want to get the Yestarday's Date as weel as dates for next 4 days from Today for this variable which are being used in the layout. Can anyone suggest the code tor this please.
    Thanks very much in advance......
    Best.... ShruMaa

    Hi,
    What I understand you need to return those dates from function module using parameter ETO_CHARSEL , right? If so just use this code:
    ls_charsel-seqno = 1.
    ls_charsel-sign = 'I'.
    ls_charsel-opt = 'BT'.  "we are giving ranges, so days between...
    ls_charsel-CHANM = I_chanm.
    ls_charsel-low = sy-datum - 1.  "...first day is yesterday
    ls_charsel-high = sy-datum + 4. "...and last day is 4 days from today
    insert ls_Charsel into table eto_charsel.
    This way you provide 5 days starting from yesterday till 4 days from today.
    Regards
    Marcin

  • Single invoice against mutiple sales order for a single customer PO

    Hi all,
    Customer provide a single order via EDI per Depot.  When the order is received into SAP these are split into multiple order based on the Production or distrubtion location of the products. The customer will receive a number of deliveries to the depot from the various locations.  Each delivery has his own SAP sales order and delivery note.  This creates mutliple invoice against a single Purchase order sent by the customer.
    We have a requirement from two customers that they only wish to receive a single invoice per depot per day.   This means we need to change the way we currently invoice the customers(no multiple invoices needed).We need to be able to combine multiple deliveries with the same PO to a single invoice.  This would mean that the invoice can't be generated until all the deliveries relating to the single PO have been POD flagged or 7 days  have passed from PO date and invoicing is due.
    how to achieve the above,whether through user exit in billing or data transfer routine in copy control(delivery to billing) or through config and how ??
    regards
    sachin

    For generating collective invoice from deliveries, you can customize the copy control (VTFL) as per your need. Please see the copy requirement 004 and data routine 001.
    Bye
    Ellath

  • Single invoice against multiple sales order for a single customer PO

    Hi all,
    Customer provide a single order via EDI per Depot.  When the order is received into SAP these are split into multiple order based on the Production or distrubtion location of the products. The customer will receive a number of deliveries to the depot from the various locations.  Each delivery has his own SAP sales order and delivery note.  This creates mutliple invoice against a single Purchase order sent by the customer.
    We have a requirement from two customers that they only wish to receive a single invoice per depot per day.   This means we need to change the way we currently invoice the customers(no multiple invoices needed).We need to be able to combine multiple deliveries with the same PO to a single invoice.  This would mean that the invoice can't be generated until all the deliveries relating to the single PO have been POD flagged or 7 days  have passed from PO date and invoicing is due.
    how to achieve the above,whether through user exit in billing or data transfer routine in copy control(delivery to billing) or through config and how ??
    regards
    sachin

    Hi Sachin,
    You will have to create a new data transfer requirement on the copy control between the delivery and the invoice. In the new data transfer requirement, you will need a programmer to code when there should be an invoice split.
    Regards,
    Finbarr

  • How to set the intial Value for a single radiobutton in a Radio Group

    Hi All,
    I have a radiogroup with 3 buttons. The Names of the RadioGroup are driven from a XXVO.
    3 Radion Buttons:
    * X
    * XX
    * XXX
    When the Page loads i want to make one Radio button XXX to be the default , please suggest how do i do it.
    Note : The radiobutton values are coming from VO
    Thanks

    Hi ,
    As AJ said create 3 radio buttons in ur page and assign to one radio group,,
    OAMessageRadioButtonBean appleButton3 =
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonOne21");
    appleButton3.setName("serviceAgreementGroup");
    appleButton3.setValue("RW");
    OAMessageRadioButtonBean orangeButton3 =
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonTwo21");
    orangeButton3.setName("serviceAgreementGroup");
    orangeButton3.setValue("NW");
    ---For radio button u can check in page it self.
    Regards
    Meher Irk
    Edited by: Meher Irk on Nov 23, 2010 2:47 PM

  • Logic - Average value for a particular Customer + Period

    Hello Experts,
    Please help me in the Logic to find out Average for the below scenario:
    This is the Output:
    Customer
    Period
    Payment Timeliness
    Cust-001
    01/97
    -4
    Cust-001
    01/97
    2
    Cust-001
    01/97
    3
    Cust-001
    04/97
    3
    Cust-001
    04/97
    5
    Cust-001
    06/97
    -4
    Cust-001
    07/97
    2
    Cust-001
    08/97
    3
    Cust-002
    09/97
    5
    Cust-002
    09/97
    4
    Cust-002
    10/97
    6
    Cust-002
    10/97
    -2
    Cust-002
    12/97
    -4
    Requirement is:
    Customer
    Period
    Payment Timeliness
    Cust-001
    01/97
    0.333
    Cust-001
    04/97
    4
    Cust-001
    06/97
    -4
    Cust-001
    07/97
    2
    Cust-001
    08/97
    3
    Cust-002
    09/97
    4.5
    Cust-002
    10/97
    2
    Cust-002
    12/97
    -4
    Display the Average of all the Payment Timeliness for a particular Month as shown above.
    My Code is:
    *&      Form  fetch_data
    FORM fetch_data .
      SELECT bukrs
             belnr
             gjahr
             blart
             bldat
             budat
             monat
       FROM  bkpf
       INTO  TABLE g_t_bkpf
       WHERE bukrs EQ '0470'
       AND   gjahr EQ p_year
       AND ( blart EQ 'EZ'
       OR    blart EQ 'DZ' )
       AND   monat IN s_month.
      IF sy-subrc EQ 0.
        SELECT bukrs
               belnr
               gjahr
               augdt
               buzei
               shkzg
               kunnr
               zfbdt
               zbd1t
               zbd2t
               zbd3t
               rebzg
         FROM  bseg
         INTO  TABLE g_t_bseg
         FOR ALL ENTRIES IN g_t_bkpf
         WHERE bukrs EQ g_t_bkpf-bukrs
         AND   belnr EQ g_t_bkpf-belnr
         AND   gjahr EQ g_t_bkpf-gjahr
         AND   kunnr IN s_kunnr.
        IF sy-subrc EQ 0.
        ELSE.
          WRITE:/'No Data Found'.
        ENDIF.
      ENDIF.
    ENDFORM.                    " fetch_data
    FORM display_paystats .
      DATA: l_due_date     TYPE faedt_fpos,
            l_timeliness   TYPE p,
            l_kunnr        type kunnr,
            l_counter      type i,
            l_period       type char5,
            l_tot_timeli   type p.
      IF g_t_bseg IS NOT INITIAL.
        WRITE: /10 'Customer ', 24 'Period ', 35 'Payment Timeliness'.
        WRITE: /10 sy-uline(44).
        LOOP AT g_t_bseg INTO g_wa_bseg.
          CLEAR l_due_date.
          CALL FUNCTION 'NET_DUE_DATE_GET'
            EXPORTING
              i_zfbdt       = g_wa_bseg-zfbdt
              i_zbd1t       = g_wa_bseg-zbd1t
              i_zbd2t       = g_wa_bseg-zbd2t
              i_zbd3t       = g_wa_bseg-zbd3t
              i_shkzg       = g_wa_bseg-shkzg
              i_rebzg       = g_wa_bseg-rebzg
           IMPORTING
             e_faedt       = l_due_date.
          READ TABLE g_t_bkpf INTO g_wa_bkpf WITH KEY
                                              bukrs = g_wa_bseg-bukrs
                                              belnr = g_wa_bseg-belnr
                                              gjahr = g_wa_bseg-gjahr.
          IF sy-subrc EQ 0.
            l_timeliness = g_wa_bkpf-budat - l_due_date.
          ENDIF.
          CLEAR g_wa_paystat.
          g_wa_paystat-kunnr = g_wa_bseg-kunnr.
          CONCATENATE g_wa_bseg-augdt+4(2) '/' g_wa_bseg-augdt+2(2) INTO g_wa_paystat-period.
          g_wa_paystat-timeli = l_timeliness.
          APPEND g_wa_paystat TO g_t_paystat.
          CLEAR : g_wa_bseg, g_wa_paystat.
        ENDLOOP.
        SORT g_t_paystat BY period.
        LOOP AT g_t_paystat INTO g_wa_paystat.
          WRITE:/10 g_wa_paystat-kunnr, 24 g_wa_paystat-period, 35 g_wa_paystat-timeli.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " display_paystats
    Where should I check the condition?
    I thought of assigning the Period / KUNNR in a Variable; then compare from the second record.
    But then how can I skip the check for 1st time inside a Loop?
    Since this is BSEG/BKPF entries; it is slow. So, please suggest some logic that doesn't affect the performance.
    Is it possible to write this logic within BSEG LOOP?
    Appreciate your help.
    Thank you!
    Thanks & Regards,
    Sowmya

    Found out by myself
    Closing the thread.
    SORT g_t_paystat BY kunnr period.
        LOOP AT g_t_paystat INTO g_wa_paystat.
          l_kunnr = g_wa_paystat-kunnr.
          l_period = g_wa_paystat-period.
          l_tot_timeli = g_wa_paystat-timeli.
          IF sy-tabix NE 1.
            READ TABLE g_t_paystat INTO g_wa_paystat1 WITH KEY kunnr  = l_kunnr
                                                               period = l_period.
            IF sy-subrc EQ 0.
              l_counter = l_counter + 1.
              l_tot_timeli = l_tot_timeli + 1.
            ELSE.
              g_wa_paystat-timeli = l_tot_timeli / l_counter.
              MODIFY g_t_paystat FROM g_wa_paystat TRANSPORTING timeli WHERE kunnr  = l_kunnr
                                                                       AND   period = l_period.
              CLEAR:
                l_counter,
                l_tot_timeli.
            ENDIF.
          ENDIF.
        ENDLOOP.
        DELETE ADJACENT DUPLICATES FROM g_t_paystat COMPARING kunnr period.
        LOOP AT g_t_paystat INTO g_wa_paystat.
          WRITE:/10 g_wa_paystat-kunnr, 24 g_wa_paystat-period, 35 g_wa_paystat-timeli.
        ENDLOOP.

Maybe you are looking for