Aging Interval for an Order Document

Hi All,
What is the logic used to calculate the Aging Interval of an Order. I believe it is based on the Payment due date in the Billing Document. Can someone give input as to how to check the Aging Interval for an Order.
Thanks and regards,
Raj.

HI
GOOD
GO THROUGH THIS REPORT
REPORT ZAP01 NO STANDARD PAGE HEADING .
TABLES: RBKPB,
        RBKP,
        lfa1,
        lfc1,
        bsIS,
        bsik.
DATA : ITAB LIKE RBKP OCCURS 0 WITH HEADER LINE.
data : dat1 like rbkp-BUDAT.
data : dat2 like rbkp-zfbdt.
data : days(10).
data : CONAME like LFA1-NAME1.
DATA  :TOT LIKE RBKP-KURSF.
DATA : TOTAL LIKE RBKP-rmwwr.
selection-screen begin of block a with frame title T.
select-options : INVOICE for  rbkp-BUDAT.
selection-screen end of block a.
loop at INVOICE.
  CASE INVOICE-SIGN.
    WHEN 'I'.
  CASE INVOICE-OPTION.
    WHEN 'EQ'.
  SELECT * FROM RBKP APPENDING CORRESPONDING FIELDS OF TABLE ITAB WHERE
BUDAT = INVOICE-LOW ORDER BY LIFNR.
    WHEN 'BT'.
SELECT * FROM RBKP APPENDING CORRESPONDING FIELDS OF TABLE ITAB WHERE
BUDAT  BETWEEN INVOICE-LOW AND INVOICE-HIGH ORDER BY LIFNR.
ENDCASE.
ENDCASE.
write :/5 'MIMOS',
        40 'INVOICE AGAING REPORT',
        75 'REPORT DATE:',SY-DATUM.
write:/75 'PAGE NO:',SY-PAGNO.
SKIP 1.
WRITE:/1 'Invoice',
       15 'Due ',
       25 'Due ',
       35 'Unpaid',
       50 'Amount',
       65 'Current',
       75 '0-30 Days',
       90 '31-60 Days',
       105 '61-90 Days'.
WRITE:/1 'Number',
       15 'Date',
       25 'Days',
       35 'Amount',
       50 'Remaining',
       65 'Invoice'.
WRITE:/ SY-ULINE.
skip 1.
ENDLOOP.
LOOP AT ITAB.
DATA : D1 like itab-BUDAT,
       D2 like itab-zfbdt,
       T1 TYPE T VALUE '091010',
       T2 TYPE T VALUE '121010',
       D3 TYPE P,
       T3 TYPE P.
CALL FUNCTION 'SD_DATETIME_DIFFERENCE'
    EXPORTING
        DATE1            = D1
        TIME1            = T1
         DATE2            = D2
         TIME2            = T2
    IMPORTING
         DATEDIFF         = D3
         TIMEDIFF         = T3
    EXCEPTIONS
         INVALID_DATETIME = 1
         OTHERS           = 2.
select * from lfc1
    where lifnr = lfc1-lifnr.
    endselect.
select * from BSIS
      where BELNR = BSIS-BELNR.
endselect.
select * from BSIk
      where BELNR = BSIk-BELNR.
endselect.
WRITE:/ ITAB-BELNR,
        12 itab-zfbdt,
        22 d3,
        35 itab-kursf,
        45 itab-rmwwr,
        60 lfc1-um01s,
        80  lfc1-um02s,
        100 lfc1-um03s.
ENDLOOP.
skip 1.
write:/ sy-uline.
THANKS
MRUTYUN

Similar Messages

  • WBS Element and Service No Link Table for Purchase Order document

    Hi Experts,
    We are Facing 1 Problem for finding link between
    WBS Element and Service No for corresponding Purchase Order document . Please Suggest me to find Related tables for Project system Module .
    Thanks and Regards
    BalaNarasimman.M

    Hi,
    The link will be in MM table, not PS table. Try EKKN.
    Regards

  • Java mapping for EDI order document

    hi,
    My project is to convert a EDI-850 Purchase Order Document using XI into an R/3 system.I planned t use java mapping So,I had got the java code necessary for the mapping from a tool called ALTOVA XML MAPRFORCE.
    I have converted the code into a .jar file and put into the XI server.The mapping is working fine now. If i give an EDI order document as input to the mapping and test the mapping the out put is coming correctly.
    Now i dont know what I should do in the Integration directory.
    As I have to convert this document and post it in a R/3 system.I have found the function module to create a Purchase Order also "BAPI_PO_CREATE".
    What should I do next ?

    Hi Mithun,
    Follow the steps below:
    1. BAPI is a RFC function module. So you import into Integration Repository. Then map your output to the structure of RFC.
    2. In the integration Directory,
    a. Create a business service representing your source.
    b. Create a business system representing your R/3 system.
        Before creating business sytem, first you need to register it as a techincal system and business system in sld.
    c. Create a Sender Agreement to pick the message from source system. Depending upon the type of source system, you need to configure the sender adapter.
    d. Create Receiver determination to route the message to the target system
    e. Create interface determination to pick the current Interface mapping to convert source message to target message
    f. Create Receiver Agreement to send the message to R/3 System. This should encapsulate Receiver Communication channel which is using IDoc adapter.
    Reward if helpful.
    Regards,
    Suraj Kumar.

  • Middleware for one-order documents

    Hello,
    by now we use the middleware only to replicate master data between R/3 and CRM and the other way round.
    Now i created a transaction type for service order in CRM system.
    We wanna create a SD-order in R/3 for all sparepart items.
    I know this is a standard szenario. But i haven´t found a configuration guide for this.
    Could anybody provide some documentation?
    At the moment i save the service order there is a bdoc in SMW01 BUS_TRANS_MSG but without sender and receiver site.
    Thank you
    Best regards
    Manfred

    Did you create the queue names??? which t-codes you used?

  • Middleware setting for sales order documents replication crm to ECC

    Hi,
    Please help me on the following query:
    what kind of middleware settings should done to get transaction documents(sales order(TA) and contracts) tranferred from SAP CRM to SAP ECC. Please provide tcode and navigate for settings.
    Thansk and Regards,
    Venkat

    Hi,
    In the below Link you can find building blocks
    http://help.sap.com/bp_crmv12007/CRM_DE/BBLibrary/HTML/BBLibrary.htm
    First of all you need to do settings in middleware (For all the settings, you refer to the Building Block guide C71)
    Then you need to do a series of settings as follows:
    Ensure that both the system are synchronized interms of Transaction types, Item categories, Item cat determinations and proper number ranges.
    Go to SMOEAC and subscribe publication BUS_TRANS_MSG to R/3 Site
    If you want to activate inter-dependent changes, make an entry in R3AC6 Tcode, with key R3A_SALES, param 1 as INT_CHANGE_ORDER, param 2 as Transaction type and scenario as A.
    Similary in ECC system, make an entry in CRMPAROLTP table with key CRM_Scenario, INT_CHANGE_ORDER, Transaction Type and A.
    I understand that this doesnot explain you in a detailed way. For more info search on help.sap.com
    Regards,
    Raghu

  • Get OTF data for a sales order document

    I have a problem in getting the information of the created sales order document number  as OTF data. I need this OTF data so to convert into PDF format using function module 'CONVERT_OTF_2_PDF'. My situation is i am keeping a parameter for sales order document number . when i execute the report after giving a sales order document number, i should get the OTF data .

    Hi!
    Firstly you have to define what technique is used for creation of sales order as printed document - smartform or sapscript. Then proceed as follows.
    In case of smartform:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZFORMNAME'
    IMPORTING
    fm_name = v_form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    i_otf[] = w_return-otfdata[].
    In case of sapscript:
      options-tdgetotf = 'X'.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    options = options
      CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
       TABLES
         otfdata                        = i_otf
       EXCEPTIONS
         unopened                       = 1
         bad_pageformat_for_print       = 2
         send_error                     = 3
         spool_error                    = 4
         OTHERS                         = 5.
    i_otf -
    Regards,
    Maxim.

  • Recalculation of quantity in free goods for return order wrf to invoice

    Hello everyone,
    I want to recalculate quantity of free goods category in a return order created with reference to an invoice, if the quantity in the High Level Item Category has changed.
    For example, a customer bought 100 boxes of product "A " and received 10 of these for free. Then he wants to return 60 boxes. When I create a return order with reference to the invoice and change these quantity from 100 to 60, free goods item category still shows 10 boxes instead of 6.
    Recalculation must be take place acording to the pricing date determination in order to apply free goods in a valid date.
    Customized features reviewing:
    1. There's not Item Category Proposal for Target Sales Doc type of the Return order, but item category of source bill type has one an is set to Pricing Type "D".
    2. High Level Item category of free goods category is relevant for billing and is set to M "Delivery - related invoices-no zero qtys (in main bath items)"
    3. Free goods category assigment has NORM as item Category Group, FREE ussage, High Level Item category is determinated for return order document type and Item category by default is the free goods category.
    I will appreciate your support to solve this issue.
    Best Regards,
    Andrea Figueroa

    Hello,
    Thank you for your response.
    My Discount Type of Free Goods determination is set to:
    Calculation Rule: "2 - Unit reference"
    Free Goods Category: "1 - Inclusive rebate (with item generation)"
    Free Goods delivery control: "C - Delivery of main item is part. delivered, only with main item"
    However, whatever the calculation rule is, if I change the quantity in the main item, subitem does not work. 
    I read about SAP Note 573598 that describes perfectly my problem, but is valid in 4.6 to 4.7 version and I have ERP version.
    Thank for your help,
    Andrea Figueroa

  • Authorization based on plant and Purchase order document type

    Hi
    My client has a requirement wherein a user will have authorization for transactions only in his plant. But only for Purchase order document type UB (Stock Transport Order) the user should be allowed to create for all plants.
    In short, if Purchase order document type is UB, should be allowed for all plants
                 if Purchase order document type is NB, should be allowed to only one particular plant.
    My Basis person says that such a restriction is not possible.
    Kindly suggest me on how to provide a solution to this.
    Thank U.

    Hi,
    This is possible.In this case you need to create two seperate roles.
    1)Create purchase order for all plants (This can be used in long text)
    2)Create purchase order for <plant no> plants.
    For case 1:--
    i)Populate field BSART of M_BEST_BSA with UB.
    ii)Populate field WERKS of M_BEST_WRK with '*'. SAP reccomends to fill up organizational data through organizational level tab only.So while doing this step you need to put * from organizational level tab only.
    For case 2:--
    i)Populate field BSART of M_BEST_BSA with NB.
    ii)Populate field WERKS of M_BEST_WRK with 'plant no'.
    Dont worry about the objects i mentioned those are maintained through SU24 and will be automatically pulled once you insert ME21 transaction code.
    Let me know if it helps.
    Thanks,
    Aveek

  • Status of an Order document

    what are the different status available for an order document.
    what is the table field that refers to?

    if you meant a sales order,  there are many like..  (look table VBUK, and VBUP)
    Reference document header status
    Total reference status of all items
    Confirmation status
    Delivery status
    Overall delivery status for all items
    Total goods movement status
    Billing status
    Billing status (order-related billing document)
    Posting Status of Billing Document
    Overall rejection status of all document items
    Overall processing status of document
    Overall picking / putaway status
    Overall status of warehouse management activities
    Total incompletion status of all items in general
    Total incompletion status of all items: Delivery
    Total incompletion status of all items: Billing

  • Message Output for purchase order

    Dear SAP Expert,
    We have defined the message output type for purchase order document type XX with special function. We have maintained condition record for the same. It is working fine.
    Now we have defined another output type for another PO document type YYwith special function by copying earlier one.
    But message output is not genarated in case of YY document type.
    Please tell us what we have missed out.
    Thanks & Regards,
    Reva.

    Hi Reva,
    In ME22N for your PO, click on the Messages button. Then click on the blue information button - this should display the output determination analysis for the order, and will show you which output determination procedure was used, which output type and access sequence was processed and whether the system was able to find a matching record. At the lowest level of detail it will show you the keys that were used to read the condition records. All this information should help you to determine why a condition record could not be found for the purchase order.
    Regards,
    Monika

  • Impact Analysis: Business Area, Profit Center changed for Sales Order type

    Hi All,
    Can you please let me know the impact of changing the Business Area and Profit Center for Sales Order Document types.
    Scenario:
    Let's say that sales document type ZOR has been used for sometime. On this document x number of sales orders have been raised, delivered and invoiced over the years.
    Now, if you change the Business Area and Profit Center what would be the business impact.
    thanks,

    Hi,
    First of all itu2019s not a good business practice to change the Business area and Profit Centre.
    However if at all l you change the Business area and Profit centre the following is the impact::
    Business Area: effects the sales order in accounts assignment at Header level.
    Profit centre: effects the accounting part at Item level
    Overall in MIS reporting w.r.t Profit and Business Analysis in Finance will be affected.
    Thanks and regards
    DSR

  • F4 for Sales Order No

    Hi All
    I am trying to put in a F4 functionality for Sales Order Document No in my BSP application. I developed the custom BSP extension and element as per Thomas's weblogs. I am able to get it working for Material No  but not for Sales Order No.
    I am trying to use the business object BUS2032 and/or a reference to the data type VBUK-VBELN but neither of them is working.
    Has anyone got the F4 to work for sales orders?
    Any suggestions would be appreciated.
    Thanks in Advance
    Shawn

    What exactly isn't working?  I don't have a system with that BSP exentions running directly on ERP, so I can't test the direct data reference.  I did try the BUS2032 object remotely.  At first I got a not authorized message. This is common for many BAPIs.  They need an authorization function module. This must be configured in table BAPIF4T. I created a single generic function module to do authorization checks by data type and then just assign them to the object (in this case VBELN_VA) in this config table. 
    You may also find that it is easier to create your own custom BOR object.  I created one generic BOR object where I can add my own Key Fields and Attributes to, in order to quickly link to any Search Help I want.

  • Alphanumeric Document number for Sales order

    Dear Experts,
    I got a requirement, The sales order number after saving the document the SO document number should be SO ( Alphabetic) 00012074 (Numeric) ie. SO00012074,
    The numeric portion will come from the number range assigned for that document and Alphabatic portion should come depending on the transaction code and document type.
    in SAPMV45AFZZ  User-exit
    FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
    This exit triggers before call function 'NUMBER_GET_NEXT'  that generates document number for the current document and return to the field vbak-vbeln and finally this is the document number, In the debug mode if I change the number for example 0000012074 to SO00012074 runtime I can get the expected number and also it is saved in the system. But in the real time it is not possible as this coding in not any user-exit.
    So I can't use this user-exit for the to get alphanumeric number in the document.
    FORM USEREXIT_SAVE_DOCUMENT
    This exit triggers after the generation of document number. In this user exit if we change the document number for example 0000012074 to SO00012074, it shows the expected number after saving the sales order but it is not actually saving in the database. Means if we try to open the same SO for example SO00012074 in va02/va03 it is showing
    SD document SO00012074 is not in the database or has been archived but if we try open 0000012074 in va02/va03, we can get the document.
    We can use this user-exit but if we change the value of vbak-vbeln in this user-exit finally it is not saving in the system.
    Can anybody help me how I can achieve the requirement ?

    bro...
    You have got an option to copy the program the standard program into zprogram....
    goto se38 and copy the program into a z program....and in doing so copy everything from the ctandard program ie vaients,documentation and function module etc.
    now change this z program to meet your need....
    both way if you dont make lot of changes you will get same performance with your work done
    regards

  • Error:-document is in transfer for purchase order..creation is not possible

    Hello,
    While doing confirmation of PO I am getting this error, saying "document is in transfer for purchase order..creation is not possible".
    can anyone please suggest me solution on this type of error?

    Hi,
    Is the PO in ORDERED status? Is there any confirmation posted for this PO which might be stuck (idoc failed to reach back end)?
    If it is a case of idoc failure, then reprocess the idoc and then do the next confirmation.
    regards,
    MRao

  • Document is in transfer for purchase order.Creation not possible

    Dear All,
    We did partial confirmation in EBP and later when trying to do confiramtion for the remaining quantiy getting the message"document is in transfer for purchase order.Creation not possible"
    We are taking this problem in production as well as in quality systems also.
    What are possible reason and how to solve it.
    kindly share your views.
    Thank you.

    Hi yshu,
    use tcode bd87 in SRM to check for failed confirmation IDOC (type MBGMCR).
    The double click the status record to see the exact cause of the failure.
    Rectify the error. Then try to execute the IDOC from BD87 tcode.
    For a few errors you may not be able to execute the IDOC but to create a new confirmation in SRM. In such cases, follow the below procedure..
    There should be an entry for the confirmation in the transfer table BBP_DOCUMENT_TAB in SRM. Display the details.
    Then run FM "BBP_DELETE_FROM_DOCUMENT_TAB" to delete the entry from the doc tab table.
    Then post a new confirmation in SRM.
    There is also a FM in SRM using which you can change the status of thefailed IDOC from 51 to 68 or 31.
    Rgds,
    MJ

Maybe you are looking for

  • How do i use proper settings in mpeg streamclip with m2t files?

    hello, i have seen this discussion before but not sure what codec i need to transfer to for my type of files... i shot a video on the **sony hvr z7u** using compact flash cards and the video was shot on 1080i 24 frames per second...all the files are

  • Import PO - GRN -

    Hi experts, We have one problem in Import Po cycle.  We have done Import PO with cvd conditions.  We have done bill of entry with INR. And for some reasons we reversed it and again book the bill of entry in INR.  After that we have done GRN.  In the

  • Insert items from two different Multiple Select Lists into a single table

    I need help. I have a training tracking system that tracks the courses taken by employees. I have created two multiple select lists, one is SelectEmployees and the other is SelectCourses. I want to insert the selected item from those two multiple sel

  • I accidentally deleted album with pictures. I have ICloud but how do I retrieve them from iCloud

    When I tune on icloud My iphone4 pictrue all gone,how can I retrieve my pictrue from my icloud?

  • Color Management HELP!

    Hello! As you can probably see, I have a problem with color management! How can I eliminate this PNG conversion? The green is bright and I practically lose his leg there. The shadows are just a lot darker then they're supposed to be. I've realized th