Need help in copying Invoice date to lower level item in Sales order report

Hello Experts,
I am debugging into one Sales order report.I need little bit help.The report is displaying Invoice Date for
Sales order Billing documents for Higher item in Bill of Material Structures.But as per user requirement,
I am supposed to show the Invoice date for lower level items also.The field for Higher level item is 'UEPOS'.
I want to copy the Invoice date for Higher level item to lower level item. Can you please guide me in the logic?
Thanking you in anticipation.
Best Regards,
Harish

Hi BreakPoint,
Thanks for the information.
I have applied the same way but it is showing only lower line items now.
Invoice dates for Higher level items are not there.
I am pasting the code here which I have applied.
Then you can give me more guidence.
This is to be done only for 'ZREP' sales orders.
if w_vbak-auart EQ 'ZREP' and w_vbak-uepos is not INITIAL.
                      read table t_final into w_final_ZREP with key vbeln = w_vbak-vbeln
                                                                    posnr = w_vbak-uepos.
                         w_final-erdat_i = w_final_ZREP-erdat_i.
                         else.
                if w_vbak-auart EQ 'ZREP' and w_vbak-uepos is INITIAL.
                  w_final-erdat_i = w_invdate.
                endif.
                endif.
Can you please sugest me changes here?
Best Regards,
Harish
Edited by: joshihaa on Jul 13, 2010 6:22 PM

Similar Messages

  • Need help to build a navigation from billing component BEABDS_BILLDOC to sales order component BT115H_SLSO on follow up create action

    Hello Experts,
    I have been assigned to a CRM-UI Object which is basically to create follow-up action i.e. creating debit/credit memos with reference of one/multiple billing documents.
    SAP has already provided an option to create the follow-up action for 1 billing document at a time, but the requirement is to create follow-up action for multiple billing documents at a time. For example, There are 2 invoices raised against a dealer "DEL" and due to some reason the dealer wants to send back the products.
    Now the dealer wants to create only 1 claim/return for those 2 invoices, Which Standard SAP doesn't provide.
    I did some of the development and added the 'Follow-up create' Button to the search result work area of the billing search. But could not able to build the link between the Billing and Sales order Components.
    It would be really a great favor if you can guide me to build this navigation link.
    Please let me know if any further information required.
    Please find the attachment for step-by-step process.
    Codes and Configs:
    Method DO_PREPARE_OUTPUT to provide the “Follow-up Create” Button
    method DO_PREPARE_OUTPUT.
    CALL METHOD SUPER->DO_PREPARE_OUTPUT .
    DATA:
    lr_coco                  TYPE REF TO cl_beabds_b_bspwdcomponen_impl,
    ls_button                TYPE crmt_thtmlb_button,
    lv_usage                  TYPE string,
    lv_info                  TYPE string,
    lv_info_transfert        TYPE string,
    lv_show_btn_transfer      TYPE boolean VALUE abap_false,
    lv_show_btn_cancel        TYPE boolean VALUE abap_false,
    lv_show_btn_split        TYPE boolean VALUE abap_false,
    lv_show_btn_create      TYPE boolean VALUE abap_false,
    lr_col                    TYPE REF TO if_bol_bo_col,
    lv_show_separator        TYPE abap_bool,
    lv_num_marked            TYPE i,
    lr_entity                TYPE REF TO if_bol_bo_property_access,
    lv_appl                  TYPE bea_appl_ubd.
    lr_coco ?= comp_controller.
    lr_col  = me->typed_context->ubdheader->collection_wrapper->get_marked( ).
    lv_num_marked = lr_col->size( ).
    * Decide based on the usage which buttons should appear, others are not shown by default
    CALL METHOD lr_coco->get_env_info
    IMPORTING
    ev_usage          = lv_usage
    ev_info          = lv_info
    ev_info_transfert = lv_info_transfert.
    CASE  lv_usage.
    WHEN cl_beabds_b_bspwdcomponen_impl=>gc_usage_search_result.
    IF lv_info_transfert = cl_beabds_b_bspwdcomponen_impl=>gc_inf_trans_search_result.
    lv_show_btn_create = abap_true.
    lv_show_separator = abap_true.
    ENDIF.
    ENDCASE.
    if  lv_show_btn_create  = abap_true.
    *  Separator between two buttons if needed
    IF lv_show_separator = abap_true.
    CLEAR ls_button.
    ls_button-type = cl_thtmlb_util=>gc_separator.
    APPEND ls_button TO gt_buttons.
    lv_show_separator = abap_false.
    ENDIF.
    CLEAR ls_button.
    IF lv_num_marked > 0.
    ls_button-enabled = abap_true.
    ELSE.
    ls_button-enabled = abap_false.
    ENDIF.
    ls_button-text      = text-001.
    ls_button-id        = 'BTN_CREATE'.                    "#EC NOTEXT
    ls_button-on_click  = 'CREATE'.                        "#EC NOTEXT
    APPEND ls_button TO gt_buttons.
    lv_show_separator = abap_true.
    ENDIF.
    endmethod.
    METHOD eh_oncreate.
    * Added by wizard: Handler for event 'CREATE'
    TYPES: BEGIN OF ty_trans,
    process_type      TYPE crmt_process_type,
    proc_type_descr_20 TYPE crmt_description_20,
    subobject_category TYPE crmt_subobject_category,
    subob_cat_descr_20 TYPE crmt_description_20,
    END OF ty_trans.
    DATA: lt_trans      TYPE STANDARD TABLE OF ty_trans ,
    ls_trans      TYPE ty_trans ,
    lv_ref_struct TYPE REF TO  ty_trans.
    DATA:
    lv_struct_ref TYPE REF TO crmt_extbt_il_header_ref,
    lv_value_node TYPE REF TO cl_bsp_wd_value_node,
    lr_ent        TYPE REF TO if_bol_bo_property_access,
    lv_bo_coll    TYPE REF TO if_bol_bo_col,
    ls_ref_header TYPE crmt_extbt_il_header_ref,
    lv_title      TYPE string,
    lr_comp_ctrl  TYPE REF TO cl_beabds_b_bspwdcomponen_impl,
    lr_cw        TYPE REF TO cl_bsp_wd_collection_wrapper,
    lr_col        TYPE REF TO if_bol_bo_col,
    lr_col_proc  TYPE REF TO if_bol_bo_col,
    lr_bo        TYPE REF TO cl_crm_bol_entity.
    IF gv_fu_popup IS NOT BOUND.
    lv_title = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_UIU_BT/FOLLOW_UP' ).
    gv_fu_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'MainWindow'
    iv_usage_name          = 'UCBTEXTFOLLOWUP'
    iv_title              = lv_title ).
    ENDIF.
    CREATE OBJECT lv_bo_coll TYPE cl_crm_bol_bo_col.
    lr_comp_ctrl ?= me->comp_controller.
    lr_cw = lr_comp_ctrl->typed_context->ubdheader->collection_wrapper.
    lr_col  = lr_cw->get_marked( ).
    CREATE DATA lv_struct_ref.
    CREATE OBJECT lv_value_node
    EXPORTING
    iv_data_ref = lv_struct_ref.
    CHECK lr_col IS BOUND AND lr_col->size( ) > 0.
    CREATE OBJECT lr_col_proc TYPE cl_crm_bol_bo_col.
    lr_bo ?= lr_col->get_first( ).
    WHILE lr_bo IS BOUND AND lr_bo IS NOT INITIAL.
    lr_bo->get_property_as_value(
    EXPORTING
    iv_attr_name    = 'HEADNO_EXT'
    IMPORTING
    ev_result      = ls_ref_header-object_id  ).
    ls_ref_header-object_type = 'BILLDO'.                  "#EC NOTEXT
    lv_value_node->set_properties( ls_ref_header ).
    lv_bo_coll->add( lv_value_node ).
    lr_bo ?= lr_col->get_next( ).
    ENDWHILE.
    gv_fu_popup->set_on_close_event( iv_view = me iv_event_name = 'FOLLOWUP_SEL_CLOSED' ).
    gv_fu_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
    gv_fu_popup->open( iv_inbound_plug = 'EXTFOLLOWUP' iv_collection = lv_bo_coll ).
    ENDMETHOD.
    method EH_ONFOLLOWUP_SEL_CLOSED.
    * Added by wizard: Handler for event 'FOLLOWUP_SEL_CLOSED'
    DATA:
    lr_context_node  TYPE REF TO cl_bsp_wd_context_node,
    lr_current      TYPE REF TO cl_crm_bol_entity,
    lr_col          TYPE REF TO if_bol_entity_col,
    lr_wdw          TYPE REF TO cl_bsp_wd_window.
    IF gv_fu_popup->get_fired_outbound_plug( ) EQ 'LEAVE'. "# EC NOTEXT
    lr_context_node = gv_fu_popup->get_context_node( iv_cnode_name = 'BTORDER' ). "# EC NOTEXT
    CHECK lr_context_node IS BOUND.
    lr_current ?= lr_context_node->collection_wrapper->get_current( ).
    CHECK lr_current IS BOUND.
    CREATE OBJECT lr_col
    TYPE
    cl_crm_bol_entity_col.
    lr_col->add( lr_current ).
    lr_wdw = me->comp_controller->if_bsp_wd_window_manager~get_window( 'MainWindow' ).
    lr_wdw->call_outbound_plug( iv_outbound_plug = 'NAVIGATE_CREATE' iv_data_collection = lr_col ). "#EC NOTEXT
    ELSEIF gv_fu_popup->get_fired_outbound_plug( ) EQ 'LEAVEPROCTYPE'. "# EC NOTEXT
    gv_fu_popup->set_on_close_event( iv_view = me iv_event_name = 'FOLLOWUP_SEL_CLOSED' ).
    gv_fu_popup->open( iv_inbound_plug = 'EXTFOLLOWUPITEMS' ).
    ENDIF.
    endmethod.
    method OP_NAVIGATE_CREATE.
    * Added by wizard: Outbound plug 'NAVIGATE_CREATE'
    DATA:
    lr_window TYPE REF TO cl_bsp_wd_window.
    lr_window = me->view_manager->get_window_controller( ).
    lr_window->call_outbound_plug( iv_outbound_plug  = 'NAVIGATE_CREATE'
    iv_data_collection = iv_data_collection ).
    endmethod.
    Thanks,
    Subhash.

    Hi Srikanth,
    I believe You are trying to implement dynamic navigation..
    lv_data_collection->add( lv_descriptor_object ).
    I can see lv_data_collection is not having the actual entity just the descriptor object details you are adding in the lv_data_collection..
    If you don't have the context node binding between source and destination component, add the required data to lv_data_collection
    , in the target component inbound plug retrieve the same data entity and set it on the relevant context node.
    To get an idea, check standard component for where dynamic navigation is implemented.
    Hope this helps..
    Cheers,
    Sumit Mittal

  • Need help on IDoc for Picking, Packing and PGI against the Sale order

    Hi All,
    I am new to this IDoc stuffs. Below is the scenario for which I would like to know the details of the IDoc...
    Business Case:
    1. Storage location is a HU Managed but not WM managed.
    2. This storage locations is managed by a third party
    3. Outbound delivery document against the SO will be created by our personnels in SAP for this storage location.
    4. Picking, Packing and PGI needs to happen/post via Idoc. (By packing here, i refer to assign the HUs that are already created for the materials and is available in the storage location and not repacking)
    Is there any standard IDoc that can be used here to Pick, Pack and post PGI. We would like to have picking and packing in a first idoc and PGI on the second idoc.
    Thanks,
    Prashant

    Hi Typewriter,
    Thanks for your reply on this post..
    The business process is as below (it was changed recently to have the creation of OBD, pick HUS and then post GI via single IDOC)
    1. We have a storage loc in our enterprise structure that is HU managed but not WM managed.
    2. This storage loc is being maintained by a third party.
    3. SO will be created to be shipped out of this plant/sloc.
    3. The stocks at this storage loc will be Special stock "E" against the sales order. And the stocks will be Packed in HUs.
    4. The third party is informed to deliver the stocks (HUs - that do have the special stock number which internally refers to the the SO number and the line item number) directly to ship to party address in SO.
    5. The 3rd party will physically ship the HUs to customer and send in the details that they have shipped goods against the sales order.
    6. The details sent by the 3rd party will be received in SAP to create OBD for the sales order, Pick, Pack and post GI. This can happen via a single IDOC..
    I am now planning to create a custom IDOC type referring to the standard IDOC type DELVRY03 and message type DESADV and to use a custom BAPI/FM.
    Do you think I am using the right ones?
    Thanks,
    Prashant Kumar

  • Date as a select option in sales order report.....

    hello guys i want to add sales doc date from as a lower field and date to as a higher field on a selection screen.....so please help me out......i also want to add error message for it.....

    Simply add the date field as select-options error msg on choosing wrong date format will be automatically triggred.
    For example for order creation date.
      select-options:   audat for vbak-audat.
    anya

  • Schedule line on BOM lower level items

    Hi Team,
    I have maintained a manual over ride for Schedule line category on a lower level item of a BOM. In sales order when I try to change the schedule line cat manually I am not able to. In fact the entire line is greyed out.
    The quantities on the main item are confirmed. can you please advise
    Thanks
    Sunny

    We are adding the unit of measure to the pricing access sequence.  If I enter a product that explodes into a lower level item from the bill of material you can only enter the unif of measure on the high level material  and it doesn't copy down to the lower level item and I want them to match.
    Thanks,
    Michelle

  • Need help in formatting the Date - Date does not

    Need help in formatting the Date - Date does not formats and give Not a valid month error in the below scenario.
    select oc.ST_PGM_MGR, r.ag_dnum, get_major_work_type(r.perf_eval_rtng_id) "v_work_code", r.ag_dnum_supp "supp", r.intfinal, to_char(r.formdate,'MM/DD/YYYY') "formdate", to_char(r.servfrom,'MM/DD/YYYY') "srv_from", to_char(r.servto,'MM/DD/YYYY') "srv_to", descript, add_months(to_char
    --- Bellow line of Code on trying to format it to mm/dd/yyyy gives the error
    (r.formdate, 'DD-MON-YYYY'),12) "formdate2"
    from  table REdited by: Lucy Discover on Jul 7, 2011 11:34 AM
    Edited by: Lucy Discover on Jul 7, 2011 1:05 PM

    Your syntax is wrong - look at the post above where this syntax is given:
    to_char (add_months(r.formdate,12), 'MM/DD/YYYY') "formdate2"Look at the formula from a logical perspective - "inside out" to read what is happening -
    take formdate, add 12 months
    add_months(r.formdate, 12)then apply the to_char format mask - basic syntax
    to_char(date, 'MM/DD/YYYY')Compare to your syntax:
    to_char(add_months(r.formdate, 'MM/DD/YYYY'),12) "formdate2"You will see your format string inside the call to add_months, and your 12 inside the call to to_char.
    Good luck!

  • Need help in logging JTDS data packets

    Hi All,
    I m having web application which uses SQL Server database.
    I have to find out some problems in database connection for that there is need to log the jtds data packets.
    I have tried to use class net.sourceforge.jtds.jdbc.TdsCore but in constructor of TdsCore class there are two parameters needed one is ConnectionJDBC2 and another is SQLDiagnostic.
    I have tried a lot but it did not allow me to import class *SQLDiagnostic*.
    I need help in logging JTDS data packets. If there are any other ways or any body having any idea about logging JTDS data packets/SQLDiagnostic.
    Please reply it is urgent...!!
    Thanks in advance......!!

    if you want to use log4j then,
    in your project create a file called log4j.properties and add this
    # Set root logger level to INFO and its only appender to ConsoleOut.
    log4j.rootLogger=INFO,ConsoleOut
    # ConsoleOut is set to be a ConsoleAppender.
    log4j.appender.ConsoleOut=org.apache.log4j.ConsoleAppender
    # ConsoleOut uses PatternLayout.
    log4j.appender.ConsoleOut.layout=org.apache.log4j.PatternLayout
    log4j.appender.ConsoleOut.layout.ConversionPattern=%-5p: [%d] %c{1} - %m%n
    log4j.logger.org.apache.jsp=DEBUG
    #Addon for
    com.sun.faces.level=FINEGo to your class and add this line
    private static final Logger logger = Logger.getLogger("classname");and then you can use
    logger.info();
    logger.error();
    methods

  • Need help in loading master data.

    Hi everyone,
              I am just a beginner in BI 7.0 . I know Bw 3.5 . I need help in loading master data(flat file) in a step by step manner.
    Before posting this forum i searched and checked out other related forums too, as i am a beginner i am unable to follow them. Lots of the forums gave the help.sap.com link which i used and got a little help but not fully, so please don't send that link.  I need a step by step guideline from somebody, which says everything from the beginning till monitoring say like
    e.g.. 1) create a InfoObject by right clicking on InfoObject catalog.
    something like that.
    please help me get a clear and detail step by step procedure to load a master data (Flat File should be good) which may help me get a start will other things without much help.
    Please help me learn.
    Thanks.
    Ranjani.

    HI,
         Thanks for your reply. This is what i did.
    1) Created a Info Area.
    2) Created Info object catalog & activated
    3) created info object with nothing except some 4 attributes.
    4) Created Application compound in Infosource tab.
    5) Right clicked on Application compound and chose create Infosource in which chose a option with 3.x and chose the flexible update and gave the info object name.
    6) In info provider tab , in the Info Area right clicked and chose the Insert char as data target option.
    Now, i am stuck. I have no idea what to do next.
    I know i have to create a transformation - There are two tabs in Transformation box, what should i do there.
    Please help me from point 6 to cont., to load the data.
    Thanks.

  • Need help in fetching requested data from JSP

    Hello,
    I really need help in fecthing requested data from JSP to servlet. Can anyone assist me as soon
    as possible because I must finish my program by today.....( 20/02/2002).
    Thanks in advance.

    It is very likely that somebody can help you, if you say what your problem is. In fact somebody might already have helped you. What is your problem?

  • Copy higher level item texts to lower level items

    Hi All ,
      I want to copy the texts of the higher level items into lower level items
    i created a logic how to copy the texts from higher level to lower level
    but the problem is there are so many textid's in higher level items,
    how to determine the all id's dynamically with out hard coding,
    is there anytable exists to determine the text id's automatically depending on the salesorder and itemno
    helpful answers  will be rewarded fully
    regards
    krishna

    Hi,
    You have to go as below:
    With Sales Order Item, you get Item Category i.e VBAP-PSTYV.
    With Item Category, go to table TVAP to detemine field TXTGR i.e Text Determination Procedure
    Now check table TTXERN with fields TDOBJECT = VBBP - Denotes Sales Order Item
        and TXTGR retreived from TVAP. Retreive the results of TDID which are the text id's associated for that sales order item.
    So the relation is VBAP -> TVAP -> TTXERN.
    Check and let me know if you have any problem.
    Kind Regards
    Eswar

  • Copy down Ship-to Partner from main item to sub-items on Sales Order

    This is my first post on the forums here.  I'd appreciate any help you can give on my issue below.
    I have a requirement to copy down the ship-to partner from the main item to sub-items during sales order create or change.  Currently I have code in include MV45AFZB within user exit USEREXIT_FILL_VBAP_FROM_HVBAP as follows:
    <i>* Need to be able to copy the ship-to of a BoM parent down to the
    respective BoM children if the parent has a different ship-to
    from the header.
    data:  wa_xvbpa like vbpa.
    Clear: wa_xvbpa.
    read table xvbpa into wa_xvbpa with key posnr = hvbap-posnr
                                            parvw = 'WE'.
    A BoM parent line has a different ship-to from the header.
        if sy-subrc = 0.
          read table xvbap with key uepos = hvbap-posnr.
    See if current line is the child of that BoM parent
            If xvbap-uepos = hvbap-posnr.
              move wa_xvbpa-kunnr to xvbpa-kunnr.
              move xvbap-vbeln to wa_xvbpa-vbeln.
              move xvbap-posnr to wa_xvbpa-posnr.
              move 'WE' to wa_xvbpa-parvw.
              modify vbpa from wa_xvbpa.
            endif.
          Endif.</i>
    This isn't working for me.  At one point, I was able to copy the ship-to down to the first sub-item but not any subsequent ones.  I'm sure I need to add some code to another sales order user exit to get this to work, but I'm at a loss at this point.   Has anyone had to do this or something similar before? 
    Thanks very much in advance for your help.
    Angela

    Hi,
    Can you check few more things and tell me?
    - In this exit, does XVBPA and XVBAP contains all the line items. ( main and sub items ).
    - In Sales order creation time, do these table have VBELN populated when this exit triggers.
    - If you modify XVBPA or XVBAP in this exit, do they get overwritten after that.
    Try this code. See if it works.  Let me know if you still have a problem.
    DATA: wa_hvbpa LIKE vbpa,
          wa_xvbpa like vbpa.
    CLEAR: wa_hvbpa, wa_xvbpa.
    * check if HVBAP and VBAP line items are not same
    IF vbap-posnr <> hvbap-posnr.
    * read the ****-to partner from main-item
      READ TABLE xvbpa INTO wa_hvbpa WITH KEY posnr = hvbap-posnr
                                              parvw = 'WE'.
      IF sy-subrc = 0.
    *   read the line item data for sub-item based on main item
        READ TABLE xvbap WITH KEY posnr = vbap-posnr
                                  uepos = hvbap-posnr.
    * See if current line is the child of that BoM parent
        IF sy-subrc = 0.
          MOVE wa_xvbpa-kunnr TO xvbpa-kunnr.
          MOVE xvbap-vbeln TO wa_xvbpa-vbeln.
          MOVE xvbap-posnr TO wa_xvbpa-posnr.
          MOVE 'WE' TO wa_xvbpa-parvw.
          MODIFY vbpa FROM wa_xvbpa.
        ENDIF.
      ENDIF.
    ENDIF.
    Regards,
    RS

  • "Low-level" authorizations for accessing BW reports - add users to role

    Using the advice in Topic "Low-level" authorizations for accessing BW reports, I have been able to publish a query to a role that has 3 test users and each user gets the same query but with different data, as determined in the tables.
    Is there a way to look up the users and e-mail addresses from a table and associate them to the role? We have several hundred e-mail recipients that will not need BW access, but only need an e-mail with a static report that contains data on their own territories.

    Hi!
    i think programatically it might be complex. You got to maintain a seperate variant of report per user and use this variant to send mail. that means you need to maintain a variant and a Broadcast setting per user. once maintained you can use it any number of times the values will be recalculated everytime.
    with regards
    ashwin
    <i>PS n: Assigning point to the helpful answers is the way of saying thanks in SDN.  you can assign points by clicking on the appropriate radio button displayed next to the answers for your question. yellow for 2, green for 6 points(2)and blue for 10 points and to close the question and marked as problem solved. closing the threads which has a solution will help the members to deal with open issues with out wasting time on problems which has a solution and also to the people who encounter the same porblem in future. This is just to give you information as you are a new user.</i>

  • Help on Sales order report

    Hi,
    I have a code to display Sales order report. But i need to generate Sales order Line item wise Report. Can anyone help me to modify this code to suit my criteria?
    DATA: IT_VBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
    DATA: IT_VBAP LIKE VBAP OCCURS 0 WITH HEADER LINE.
    PARAMETERS: SORG LIKE VBAK-VKORG,
    CCODE LIKE VBAK-BUKRS_VF.
    SELECT * FROM VBAK INTO TABLE IT_VBAK UP TO 100 ROWS
    WHERE
    VKORG = SORG AND
    BUKRS_VF = CCODE.
    SELECT * FROM VBAP INTO TABLE IT_VBAP UP TO 100 ROWS
    FOR ALL ENTRIES IN IT_VBAK
    WHERE
    VBELN = IT_VBAK-VBELN.
    LOOP AT IT_VBAP.
    WRITE: / IT_VBAP-VBELN, IT_VBAP-ERNAM, IT_VBAP-POSNR.
    ENDLOOP.
    Thanks in advance..
    Any help will be greatly appritiated

    Hi
    Hope it will help you..
    Reward if help.
    REPORT ZVRDOC0 no standard page heading
    line-size 300
    line-count 50(5).
    TABLES : vbak, "Sales Document Header Level
    vbap, "Sales Document Header Level
    kna1. "General Data in customer Master
    *INTERNAL TABLE T_VBAP
    DATA : Begin of t_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           posnr like vbap-posnr,
           arktx like vbap-arktx,
           kwmeng like vbap-kwmeng,
           cmkua like vbap-cmkua,
           end of t_vbap.
    *INTERNAL TABLE T_TAB.
    DATA : Begin of t_tab occurs 0,
            vbeln like vbak-vbeln,
            kunnr like vbak-kunnr,
            audat like vbak-audat,
            netwr like vbak-netwr,
            vkorg like vbak-vkorg,
            name1 like kna1-name1,
            land1 like kna1-land1,
            end of t_tab.
    *INTERNAL TABLE T_FINAL.
    DATA : Begin of t_final occurs 0,
            vbeln like vbap-vbeln,
            kunnr like vbak-kunnr,
            matnr like vbap-matnr,
            posnr like vbap-posnr,
            arktx like vbap-arktx,
            kwmeng like vbap-kwmeng,
            cmkua like vbap-cmkua,
            audat like vbak-audat,
            netwr like vbak-netwr,
            vkorg like vbak-vkorg,
            name1 like kna1-name1,
            land1 like kna1-land1,
            end of t_final.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-bO3.
    parameters : P_kunnr like vbak-kunnr.
    select-options : S_vbeln for vbak-vbeln,
                     S_audat for vbak-audat.
    SELECTION-SCREEN END OF BLOCK B1.
    start-of-selection.
    select vbeln  matnr posnr arktx kwmeng cmkua  from vbap
    into corresponding fields  of table  t_vbap  where vbeln in S_vbeln .
    IF sy-subrc EQ 0.
    select  vbakkunnr vbakvbeln vbakaudat vbaknetwr vbak~vkorg
            kna1name1 kna1land1  into  table   t_Tab   from
            vbak   join  kna1   on kna1kunnr  = vbakkunnr
            FOR ALL ENTRIES IN t_vbap
            where vbak~vbeln = t_vbap-Vbeln and
            vbak~kunnr = p_kunnr and
            vbak~audat  in  S_audat .
    ENDIF.
    *end-of-selection.
    loop at t_vbap.
    read table t_tab with key vbeln = t_vbap-vbeln.
    move :
    t_vbap-vbeln to t_final-vbeln,
    t_vbap-matnr to t_final-matnr,
    t_vbap-posnr to t_final-posnr,
    t_vbap-arktx to t_final-arktx,
    t_vbap-kwmeng to t_final-kwmeng,
    t_vbap-cmkua to t_final-cmkua,
    t_tab-kunnr to t_final-kunnr,
    t_tab-audat to t_final-audat,
    t_tab-netwr to t_final-netwr,
    t_tab-vkorg to t_final-vkorg,
    t_tab-name1 to t_final-name1,
    t_tab-land1 to t_final-land1.
    append t_final.
    clear t_Final.
    endloop.
    sort t_Final by vbeln   Kunnr    matnr posnr  .
    loop at t_final.
    at new vbeln.
    write : /1 SY-VLINE, 2 t_final-vbeln color 5 inverse.
    ULINE /1(250).
    endat.
    write : /1 SY-VLINE, 2 t_final-vbeln color 5 inverse,
    20 SY-VLINE, 21 t_final-posnr color 5 inverse,
    40 SY-VLINE, 41 t_final-matnr color 5 inverse,
    60 SY-VLINE, 61 t_final-arktx color 4 inverse,
    80 SY-VLINE, 81 t_final-kwmeng color 4 inverse,
    100 SY-VLINE, 101 t_final-cmkua color 4 inverse,
    120 SY-VLINE, 121 t_final-kunnr color 3 inverse,
    140 SY-VLINE, 141 t_final-audat color 3 inverse,
    160 SY-VLINE, 161 t_final-netwr color 2 inverse,
    180 SY-VLINE, 181 t_final-vkorg color 2 inverse,
    210 SY-VLINE, 211 t_final-name1 color 1 inverse,
    230 SY-VLINE, 231 t_final-land1 color 1 inverse,
    250 SY-VLINE.
    at end of vbeln.
    sum.
    ULINE /1(250).
    write: /60 SY-VLINE, 'Total' ,
    81 t_final-kwmeng color 4 inverse ,100 SY-VLINE,
    101 t_final-cmkua color 4 inverse,120 SY-VLINE.
    ULINE /1(250).
    endat.
    at last.
    SKIP 2.
    sum.
    ULINE /1(250).
    write: /1 SY-VLINE, 60 SY-VLINE, 'Grand Total' ,
    81 t_final-kwmeng color 4 inverse , 100 SY-VLINE ,
    101 t_final-cmkua color 4 inverse,120 SY-VLINE.
    ULINE /1(250).
    endat.
    endloop.
    TOP-OF-PAGE.
    ULINE /50(24).
    WRITE : /50 SY-VLINE , 52 'SALES ORDER DETAILS' COLOR 5,
    73 SY-VLINE.
    ULINE /50(24).
    ULINE .
    WRITE: /10 'CURRENT DATE :', 25 SY-DATUM COLOR 1 INVERSE,
    100 'CURRENT TIME :', 115 SY-UZEIT color 5 INVERSE.
    WRITE: /10 'USERNAME :', 25 SY-UNAME COLOR 1 INVERSE,
    100 'PAGE NO :', 113 SY-PAGNO COLOR 5 INVERSE.
    WRITE: /10 'LOGON CLIENT :', 25 SY-MANDT COLOR 1 INVERSE,
    100 'COLON N0 :', 114 SY-COLNO COLOR 5 INVERSE.
    WRITE: /10 'CURRENT REPROT:', 25 SY-REPID COLOR 1 INVERSE,
    100 'LANGUAGE :', 116 SY-LANGU COLOR 5 INVERSE.
    ULINE.
    ULINE /1(250).
    write : /1 SY-VLINE, 2 'SALES DOC NO' color 6 inverse,
    20 SY-VLINE, 21 'SALES DOC ITEM' color 6 inverse,
    40 SY-VLINE,41 'MATERIAL NO' color 6 inverse,
    60 SY-VLINE, 61 'SHORT SALES TEXT' color 6 inverse,
    80 SY-VLINE, 81 'CUMM ORDER SALES' color 6 inverse,
    100 SY-VLINE, 101 'CREDIT DATA' color 6 inverse,
    120 SY-VLINE, 121 'CUSTOMER NO' color 6 inverse,
    140 SY-VLINE, 141 'DOC DATE' color 6 inverse,
    160 SY-VLINE, 161 'NET VALUE SALES' color 6 inverse,
    180 SY-VLINE, 181 'SALES ORG' color 6 inverse,
    210 SY-VLINE, 211 'CUSTOMER NAME' color 6 inverse,
    230 SY-VLINE, 231 'CUSTOMER CONTY' color 6 inverse,
    250 SY-VLINE.
    ULINE /1(250).
    END-OF-PAGE.
    ULINE.
    WRITE: /45 ' THIS IS END OF PAGE FOR SALES DOCUMENT DETAILS'
    COLOR 6 .

  • Fix Date & Qty Field in Schedule Lines Sales Order

    Dear Friends,
    I want to understand the need and use of the Fix Date & Qty field check in the sales order -> Item -> Schedule Lines.
    Can anybody explain me the need of the same.
    Regards,
    Harsh

    If the availability check for an item determines that the item cannot be delivered fully on the requested delivery date, and, as a result one or more schedule lines have to be created for later delivery dates, the customer can decide whether to accept these delivery dates and quantities.
    You can record the customer's decision either by setting an indicator in the Fixed date and qty field or by leaving this field blank. The field is displayed both on the schedule line overview screen and on the availability screen.
    <b>Customer Accepts the Schedule Line Proposal</b>
    If the customer accepts the schedule lines which are proposed by the system, mark the Fixed date and qty field. The system then transfers the requirements for the schedule lines to material requirements planning.
    <b>Customer Requires Goods Earlier</b>
    If the customer requires the goods earlier than the date that the system can confirm after the availability check, leave the Fixed date and qty field blank. The system then only passes on the requirements for the requested delivery date and does not take the quantities and dates confirmed by the system after the availability check into account. In this case, it is assumed that the requested delivery date can be kept to because, for example, additional production capacity may become free. The system only confirms the sales order once the entire order quantity can be delivered on the requested delivery date. In the subsequent delivery processing, the sales order is only considered to be completed when the entire order quantity has been delivered or when all partial delivery agreements have been fulfilled.
    A fixed item is considered to be completed once the entire confirmed quantity (which can be smaller than the originally requested order quantity)has been delivered. Therefore, it does not make sense to fix the confirmed quantity to 0 as the item is considered to be completed from the start.
    During rescheduling, the fixed quantities and dates are no longer taken into account.
    The same info u can get easily from help.sap.com
    Message was edited by:
            sam masker

  • Updation of higher level item text to lower level item text

    Hi All,
    while creating sales order VA01   i need to pass the value of higher level item text to lower level item text
    for that i read the text of the higher level item text using the fm read_text
    and pass the text to the lower level items using save_text and commit_text
    this coding works only when the lower order item  text is empty
    my queries are
    1. if the lower level item having some text that text will be replaced by the higher level item text, that is happening but showing error that I/O error , how to solve this
    2. while gone to VA02 and add one more item then also same error is happening how to solve this please help me.
    regards
    krishna

    got the solution

Maybe you are looking for

  • Can't reinstall Windows 7 with Operating System Recovery Disk x120e

    Hi, I dabbled with Ubuntu on my Thinkpad x120e, but found that the dual-boot was unneccessary.  I (likely foolishly) followed directions online to use EasyBCD (http://www.makeuseof.com/tag/nongeeks-guide-safely-uninstall-ubuntu-dualbooting-machine/)

  • Sync chaos and rollback to good old non-iCloud times

    Hi. I've got a problem with iCloud sync. I posess a pair of macbooks, an iPad and an iPhone. All those gadgets are syncing to the icloud: docs, pictures and music. I'm really unhappy with how they do it, because I've got no control over the process a

  • Contact list in 6230i how do I transfer to 6300

    Hi I have loaded Nokia PC suite, connected phone via bluetooth and attempted to synchronise and view my contacts/phone list in PC suite. Unfortunately I cannot see my phonelist on the 6230i. What am I doing wrong? I have been able to tranfer the pict

  • Playlists will not sync on iphone 5

    Playlists used to sync and now certain playlists stopped syncing when they used to sync before.  Tried to unsync all my music and then resync and that didn't work.  I turned on home sharing to match home sharing setting on my desktop PC - that didn't

  • TABLE(VARRAY) applied to multiple VARRAY instances - possible ???

    Question: How can I make a VARRAY column look like a table, if I want the result being based on multiple rows. Example: I have got a table with runs of users. For each run I have one row in RESULTS where the VARRAY v contains one entry per user. I wa