Header and item details on same screen in form of two reports

Hello,
I would like to print in a same screen two ALV grid with different command for each.
The two grid will be linked.
One is the header of the datas and the second represent the items of the selected data in the the header grid.
example user will get all sales order details and when user click on any sales order than on the same screen below i get the item data of that sales order...
how can i do that
Do you have any example for me, please ?
Thanks in advance for help,
Best regards,
Taran

Hi
use ALV hierarchial display function module for this.
see the sample code for this
REPORT  zwmr_pick_status_report NO STANDARD PAGE HEADING
                                MESSAGE-ID zw.
Type Pools                                                          
TYPE-POOLS: icon, slis.
Tables                                                              
TABLES: tvst,
        likp,
        t30b,
        vekp,
*{   INSERT         UKMK900355                                        4
        zhu_to_link,                                        "AS03
*}   INSERT
        zpallettr,
        vttk,                                               "MB01
        zvantr.
Types                                                               
TYPES:
  BEGIN OF ty_data,
     lgtor       LIKE likp-lgtor,             " door
     vbeln       LIKE likp-vbeln,             " delivery
     wbstk       LIKE vbuk-wbstk,             " Goods movement status
     kostk       LIKE vbuk-kostk,             " Picking status
     posnr       LIKE lips-posnr,             " item
     route       LIKE likp-route,             " route
     wadat       LIKE likp-wadat,             " goods issue date
     lvsta       LIKE vbup-lvsta,             " warehouse status
     packvorschr LIKE vekp-packvorschr,       " pack mnemonic
     exidv       LIKE vekp-exidv,             " handling unit
     zpallet_no(10),  "like zpallettr-zpallet_no,   " pallet no
     zdep_point  LIKE zpallettr-zdep_point,   "Departur Point "Jvdm01
     zcount_check LIKE zpallettr-zcount_check," count check flag
     zvan_no(10),     "like zvantr-zvan_no,         " van no
     zvan_print  LIKE zvantr-zvan_print,      " van manifest print
     tknum       LIKE vttk-tknum,             " Shipment No  "ANV 11523
     zeod_print  LIKE zvantr-zeod_print,      " eod manifest print
     zzpackclass LIKE vekp-zzpackclass,       " package class
     zzti        LIKE vekp-zzti,              " T.I. value
     vstel       LIKE likp-vstel,             "Shipping point RM050906
     anzpk       TYPE znopack,            "No of packages in dlv MB01+
  END OF ty_data.
TYPES:BEGIN OF x_likp ,
      vbeln LIKE likp-vbeln,
      vstel LIKE likp-vstel,                                "RM050906
      lgtor LIKE likp-lgtor,
      zzroute2lgtor LIKE likp-zzroute2lgtor,                "MB01
      route LIKE likp-route,
      wadat LIKE likp-wadat,
      zz2route LIKE likp-zz2route,                          "MB01+
      zzexproute LIKE likp-zzexproute,                      "MB01+
      zzroute2 LIKE likp-zzroute2,                          "MB01+
      anzpk    LIKE likp-anzpk,
      END OF x_likp.
TYPES: BEGIN OF x_vbuk,
       vbeln TYPE vbuk-vbeln,
       wbstk TYPE vbuk-wbstk,             " Goods movement status
       kostk TYPE vbuk-kostk,             " Picking status
       END OF x_vbuk.
TYPES: BEGIN OF x_lips,
      vbeln TYPE lips-vbeln,             " delivery
      posnr TYPE lips-posnr,             " item
      pstyv TYPE lips-pstyv,
      matnr TYPE lips-matnr,
      charg TYPE lips-charg,
      END OF x_lips.
TYPES: BEGIN OF x_vbup,
       vbeln TYPE vbup-vbeln,             " delivery
       posnr TYPE vbup-posnr,             " item
       lvsta TYPE vbup-lvsta,             " warehouse status
       END OF x_vbup.
TYPES: BEGIN OF x_vepo,
       venum TYPE vepo-venum,             "Internal Handling Unit
Number
       vepos TYPE vepo-vepos,             "Handling Unit Item
       vbeln TYPE vepo-vbeln,             " delivery
       posnr TYPE vepo-posnr,             " item
       exidv TYPE vekp-exidv,
       END OF x_vepo.
TYPES: BEGIN OF x_vepo1,
       venum TYPE vekp-venum,             "Internal Handling Unit
Number
       exidv TYPE vekp-exidv,
       END OF x_vepo1.
Start of changes by ANV SR#11523
TYPES: BEGIN OF x_vttp,
         tknum TYPE tknum,                  " Shipment No
         tpnum TYPE tpnum,                  " Item No
         vbeln TYPE vbup-vbeln,             " delivery
         laufk LIKE vttk-laufk,             " leg indicator MB01+
       END OF x_vttp.
End of changes by ANV SR#11523
Data                                                                
RANGES: r_del   FOR likp-vbeln,
        r_lgtor FOR likp-lgtor.
RANGES: r_vanno FOR zvantr-zvan_no,
        r_palno FOR zpallettr-zpallet_no.
DATA: BEGIN OF number_range OCCURS 0,
         mark(1),
         id(3),
         num(10) TYPE n,
         desc LIKE zpalletmd-zdesc,
      END OF number_range.
DATA: t_disp_tab  TYPE STANDARD TABLE OF zpickdisp,
      t_data_tab  TYPE ty_data  OCCURS 0 WITH HEADER LINE,
      it_likp TYPE x_likp OCCURS 0 WITH HEADER LINE,         "SUM
      it_vbuk TYPE x_vbuk OCCURS 0 WITH HEADER LINE,         "SUM
      it_lips TYPE x_lips OCCURS 0 WITH HEADER LINE,         "SUM
      it_vbup TYPE x_vbup OCCURS 0 WITH HEADER LINE,         "SUM
      it_vepo TYPE x_vepo OCCURS 0 WITH HEADER LINE,         "SUM
      it_vepo2 TYPE x_vepo OCCURS 0 WITH HEADER LINE,        "SUM
*{   INSERT         UKMK900355                                        3
      t_vepo_low TYPE x_vepo OCCURS 0 WITH HEADER LINE,     " AS01
*}   INSERT
      it_vepo1 TYPE x_vepo1 OCCURS 0 WITH HEADER LINE,       "SUM
      it_vttp TYPE x_vttp OCCURS 0 WITH HEADER LINE, "ANV SR#11523
t_disp_head TYPE STANDARD TABLE OF zpickhead.
DATA wa_item_tab TYPE zpickdisp OCCURS 0 WITH HEADER LINE.
"ANV SR#11113
DATA: w_numrnge LIKE number_range,
      w_number(10) TYPE n.
DATA: t_likp     LIKE likp      OCCURS 0 WITH HEADER LINE,
      t_lips     LIKE lips      OCCURS 0 WITH HEADER LINE,
      t_vbuk     LIKE vbuk      OCCURS 0 WITH HEADER LINE,
      t_vbup     LIKE vbup      OCCURS 0 WITH HEADER LINE,
      t_vepo     LIKE vepo      OCCURS 0 WITH HEADER LINE,
      t_vekp     LIKE vekp      OCCURS 0 WITH HEADER LINE,
      t_vantr    LIKE zvantr    OCCURS 0 WITH HEADER LINE,
      t_pallettr LIKE zpallettr OCCURS 0 WITH HEADER LINE,
     w_likp     like likp,
     w_lips     LIKE lips,
     w_vbuk     LIKE vbuk,
     w_vbup     LIKE vbup,
     w_vepo     LIKE vepo,
      w_vekp     LIKE vekp,
      w_vepo     TYPE x_vepo1,
      w_vbup     TYPE x_vbup,
      w_vttp     TYPE x_vttp,    " ANV SR#11523
      w_lips     TYPE x_lips,
      w_vbuk     TYPE x_vbuk,
      w_likp     TYPE x_likp,                               "MB01-+
      w_tplst    LIKE vttk-tplst.                           "MB01+
DATA: s_variant  LIKE disvariant,                           "MB01+
      def_variant LIKE disvariant.
ALV DATA *****
DATA:
     g_grid             TYPE REF TO cl_gui_alv_grid,
     g_sort             TYPE slis_t_sortinfo_alv,
     g_custom_container TYPE REF TO cl_gui_custom_container,
     g_layout           TYPE slis_layout_alv,
     gt_fieldcat        TYPE slis_t_fieldcat_alv,
     t_fldcat           LIKE LINE OF gt_fieldcat,
     g_keyinfo          TYPE slis_keyinfo_alv,
     gt_events          TYPE slis_t_event,
     gs_event           TYPE slis_alv_event,
     w_sy_repid         LIKE sy-repid.
DATA: BEGIN OF seltab OCCURS 0.
        INCLUDE STRUCTURE rsparams.
DATA: END OF seltab.
SYSTEM GENERATED TABLE CONTROL DATA ********
DECLARATION OF TABLECONTROL 'TC_TABCON' ITSELF
CONTROLS: tc_tabcon TYPE TABLEVIEW USING SCREEN 0100.
LINES OF TABLECONTROL 'TC_TABCON'
DATA:     g_tc_tabcon_lines  LIKE sy-loopc.
DATA:     ok_code LIKE sy-ucomm.
Constants                                                           
CONSTANTS: c_data_class LIKE klah-class VALUE 'DG_DATA',
           c_mat_class  LIKE rmclf-klart VALUE '001',
           c_pack       LIKE lips-mtart VALUE 'VERP',
           c_a(1)            VALUE 'A',
           c_b(1)            VALUE 'B',
           c_c(1)            VALUE 'C',
           c_yes(1)          VALUE 'X',
           c_no(1)           VALUE ' '.
Selection screen                                                    
standard report select options block
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-002.
SELECT-OPTIONS:
  s_wadat FOR likp-wadat NO-EXTENSION OBLIGATORY.  " Goods Issue Date
*parameters:                                           "TR01-
p_vstel like tvst-vstel obligatory. " Shipping Point "TR01-
SELECT-OPTIONS:                                             "TR01+
  p_vstel FOR tvst-vstel.            " Shipping Point  "TR01+
SELECT-OPTIONS:
  s_lfart FOR likp-lfart,            " Delivery type
  s_lgtor FOR t30b-lgtor,            " Door selection
  s_exidv FOR vekp-exidv,            " Handling Unit
  s_vbeln FOR likp-vbeln,            " Delivery            "MB01-+
  s_lfdat FOR likp-lfdat.            " Delivery date
PARAMETERS:
  p_exdata AS CHECKBOX.              " Show extra columns flag
SELECTION-SCREEN END OF BLOCK a.
van/pallet specific select options block
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-001.
SELECT-OPTIONS:
  s_palno FOR zpallettr-zpallet_no, " no-extension,
  s_vanno FOR zvantr-zvan_no.       " no-extension.
SELECT-OPTIONS:
  s_deppnt FOR zpallettr-zdep_point,                        "Jvdm01
  s_tplst  FOR vttk-tplst.                                  "MB01
SELECTION-SCREEN END OF BLOCK b.
MB01 - START - Display variant
SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-019.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK c.
MB01 - END
Value Request Events                                                
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-low.
  CLEAR: number_range, w_number .
  REFRESH number_range.
select numbers and display pop up screen for selection
  PERFORM select_pal_nos.
  s_palno-low = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_palno-high.
  CLEAR: number_range, w_number .
  REFRESH number_range.
select numbers and display pop up screen for selection
  PERFORM select_pal_nos.
  s_palno-high = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-low.
  CLEAR: number_range, w_number .
  REFRESH number_range.
select numbers and display pop up screen for selection
  PERFORM select_van_nos.
  s_vanno-low = w_number.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_vanno-high.
  CLEAR: number_range, w_number .
  REFRESH number_range.
select numbers and display pop up screen for selection
  PERFORM select_van_nos.
  s_vanno-high = w_number.
MB01 - START - display variant
F4-Help for variant
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
  PERFORM f4_for_variant.
MB01 - END
At Selection Screen                                                 
AT SELECTION-SCREEN.
  PERFORM validate_selections.
Initialization                                                      
INITIALIZATION.
MB01 - START INSERT
1.  Transportation planning point
Import transportation planning point from user parameters and
populate
select option.
  GET PARAMETER ID 'TDP' FIELD w_tplst.
  MOVE: 'I'      TO s_tplst-sign,
         'EQ'     TO s_tplst-option,
         w_tplst TO s_tplst-low.
  APPEND s_tplst.
2.  Display variant
  CLEAR s_variant.
  s_variant-report = sy-repid.
Get default variant
s_def_variante = s_variant.
  CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
       EXPORTING
            i_save     = 'A'
       CHANGING
            cs_variant = s_variant
       EXCEPTIONS
            not_found  = 2.
  IF sy-subrc = 0.
    p_vari = s_variant-variant.
  ENDIF.
MB01 - END INSERT
Start of selection                                                  
START-OF-SELECTION.
clear all data tables
  CLEAR: t_likp,
        it_likp,
         t_lips,
         t_vbuk,
         t_vbup,
         t_vepo,
         t_vantr,
         t_pallettr,
         w_likp,
         w_lips,
         w_vbuk,
         w_vbup,
         w_vepo,
         w_vekp.
  REFRESH: t_likp,
          it_likp,
           t_lips,
           t_vbuk,
           t_vbup,
           t_vepo,
           t_vantr,
           t_pallettr.
select data for ALV
due to different input parameters being used, to streamline the data
selection process, different selection methods are required
  IF NOT s_vanno IS INITIAL
  OR NOT s_palno IS INITIAL
  OR NOT s_deppnt IS INITIAL.                               "Jvdm01
  if selecting by van/pallet number, need to select the data from the
  handling unit upwards to delivery
    PERFORM select_data_up.
  ELSE.
  otherwise the data can be selected from the delivery downwards
    PERFORM select_data_down.
  ENDIF.
End of selection                                                    
END-OF-SELECTION.
call hierarchical ALV display function module
  CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
       EXPORTING
            i_callback_program       = 'ZWMR_PICK_STATUS_REPORT'
            i_callback_pf_status_set = 'SET_STATUS'
            i_callback_user_command =
               'USER_COMMAND' "custom gui status form
            is_layout                = g_layout  "user command form
            it_fieldcat              = gt_fieldcat
            it_sort                  = g_sort
            i_save                   = 'X'                  "MB01+
            is_variant               = s_variant
            it_events                = gt_events
            i_tabname_header         = 't_disp_head'
            i_tabname_item           = 't_disp_tab'
            i_structure_name_header  = 'ZPICKHEAD'
            i_structure_name_item    = 'ZPICKDISP'
            is_keyinfo               = g_keyinfo
       TABLES
            t_outtab_header          = t_disp_head
            t_outtab_item            = t_disp_tab.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
                            FORMS                                   
Includes inserted by Screen Painter Wizard. DO NOT CHANGE THIS LINE!
INCLUDE zwmr_pick_o01.
  INCLUDE zwmr_pick_status_reporto01 .
INCLUDE zwmr_pick_i01.
  INCLUDE zwmr_pick_status_reporti01 .
INCLUDE zwmr_pick_f01.
  INCLUDE zwmr_pick_status_reportf01 .
*&      Form  select_pal_nos
      select pallet numbers for search help
FORM select_pal_nos.
  DATA: BEGIN OF t_palno OCCURS 0,
          zpallet_no LIKE zpallettr-zpallet_no,
        END OF t_palno.
select all available pallet numbers
  SELECT DISTINCT zpallet_no FROM zpallettr
                  INTO CORRESPONDING FIELDS OF TABLE t_palno.
  LOOP AT t_palno.
  get pallet id
    SELECT SINGLE zpallet_id FROM zpallettr
                  INTO number_range-id
                  WHERE zpallet_no = t_palno-zpallet_no.
  get pallet description
    SELECT SINGLE zdesc FROM zpalletmd
                  INTO number_range-desc
                  WHERE zpallet_id = number_range-id.
    number_range-num = t_palno-zpallet_no.
  append to search help table
    APPEND number_range.
  ENDLOOP.
call pop up dialog box
  CALL SCREEN 0100 STARTING AT 5 5.
ENDFORM.                    " select_pal_nos
*&      Form  select_van_nos
      select van numbers for search help
FORM select_van_nos.
  DATA: BEGIN OF t_vanno OCCURS 0,
          zvan_no LIKE zvantr-zvan_no,
        END OF t_vanno.
select available van numbers
  SELECT DISTINCT zvan_no FROM zvantr
                  INTO CORRESPONDING FIELDS OF TABLE t_vanno.
  LOOP AT t_vanno.
  select van id
    SELECT SINGLE zvan_id FROM zvantr
                  INTO number_range-id
                  WHERE zvan_no = t_vanno-zvan_no.
  select van description (maintained in pallet tables)
    SELECT SINGLE zdesc FROM zpalletmd
                  INTO number_range-desc
                  WHERE zpallet_id = number_range-id.
    number_range-num = t_vanno-zvan_no.
  append to search help table
    APPEND number_range.
  ENDLOOP.
call pop up dialog box
  CALL SCREEN 0100 STARTING AT 5 5.
ENDFORM.                    " select_van_nos
*&      Form  select_data_down
      select data if selecting from delivery down
FORM select_data_down.
select all deliveries from LIKP that fulfill selection criteria
Start SU01 optmization changes
SELECT vbeln vstel lgtor route wadat                      "RM050906
  SELECT vbeln vstel lgtor route wadat
         zzroute2lgtor zz2route zzexproute zzroute2 anzpk      "MB01-+
           FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp"MB01-+
                     WHERE vbeln IN s_vbeln
                     AND   vstel IN p_vstel
                     AND   lfart IN s_lfart
                     AND   wadat IN s_wadat
                     AND   lfdat IN s_lfdat                    "MB01+
                     AND
             ( lgtor IN s_lgtor OR zzroute2lgtor IN s_lgtor ) ."MB01+
  IF sy-subrc NE 0.
  no data found
    MESSAGE i007.
    EXIT.
  ENDIF.
IF NOT t_likp[] IS INITIAL.                             "SUM
  IF NOT it_likp[] IS INITIAL.
    SORT it_likp BY vbeln.                                  "SUM
  select sales document headers from VBUK
    SELECT vbeln wbstk kostk
                FROM vbuk INTO TABLE it_vbuk
                 FOR ALL ENTRIES IN it_likp                "SUM
                 WHERE vbeln EQ it_likp-vbeln.             "SUM
    SORT it_vbuk BY vbeln.
  select all relevant delivery items from LIPS
    SELECT vbeln posnr pstyv matnr charg
                FROM lips INTO TABLE it_lips
                  FOR ALL ENTRIES IN it_likp
                  WHERE vbeln EQ it_likp-vbeln
                  AND   pckpf NE 'B'           "cannot be packed  "AS05
                AND   pstyv NE 'ZPAC'                           "AS05
                AND   pstyv NE 'ZGDP'                    "TR02+ "AS05
                  AND   lfimg GT 0.                         "TR01+
  ENDIF.
  IF NOT it_lips[] IS INITIAL.
  select all sales document line items from VBUP
    SORT it_lips BY vbeln posnr.                      "SUM
    SELECT vbeln posnr lvsta
                FROM vbup INTO TABLE it_vbup
                  FOR ALL ENTRIES IN it_lips
                  WHERE vbeln EQ it_lips-vbeln
                  AND   posnr = it_lips-posnr.
    SORT it_vbup BY vbeln posnr.
  select corresponding handling unit ID's (venum)
TR03 Replace
start
   select * from vepo appending corresponding fields of table t_vepo
                 for all entries in t_lips
                 where vbeln = t_lips-vbeln
                 and   posnr = t_lips-posnr
                 and   matnr = t_lips-matnr
                 and   charg = t_lips-charg.
   SELECT vepoVENUM vepoVEPOS vepovbeln vepoposnr
                 FROM vepo as vepo
                 INNER JOIN vekp as vekp ON vepovenum = vekpvenum
                 APPENDING corresponding fields of table it_vepo
                 FOR ALL ENTRIES IN it_lips
                 WHERE vepo~vbeln = it_lips-vbeln
                 AND   vepo~posnr = it_lips-posnr
                 AND   vepo~matnr = it_lips-matnr
                 AND   vepo~charg = it_lips-charg
                 AND   vekp~exidv IN s_exidv.
    SELECT venum vepos vbeln posnr
                  FROM vepo INTO TABLE it_vepo2
                  FOR ALL ENTRIES IN it_lips
                  WHERE vbeln = it_lips-vbeln
                  AND   posnr = it_lips-posnr
                  AND   matnr = it_lips-matnr
                  AND   charg = it_lips-charg.
    SORT it_vepo2 BY venum vepos.
*{   INSERT         UKMK900355                                        1
  Ice-multis: replace lower-level HUs with highest level       " AS01
    PERFORM replace_highest_hu.                             " AS01
*}   INSERT
Start of changes by ANV SR#11523
MB01 - extract shipment header as well to populate leg indicator
Therefore, join vttp with vttk
Limit as well by transportation planning point
    SELECT vttptknum vttptpnum vttpvbeln vttklaufk
                  FROM vttp INNER JOIN vttk
                  ON vttptknum = vttktknum
                  INTO  TABLE it_vttp
                  FOR ALL ENTRIES IN it_lips
                  WHERE vttp~vbeln = it_lips-vbeln
                  AND   vttk~tplst IN s_tplst.
MB01 - END
End of changes by ANV SR#11523
    IF NOT it_vepo2[] IS INITIAL.
      SELECT venum exidv
                    FROM vekp INTO TABLE it_vepo1
                    FOR ALL ENTRIES IN it_vepo2
                    WHERE venum = it_vepo2-venum
                    AND   exidv IN s_exidv.
    ENDIF.
    SORT it_vepo1 BY venum.
    CLEAR: w_vepo, it_vepo.
    LOOP AT it_vepo1.
      READ TABLE it_vepo2 WITH KEY venum = it_vepo1-venum.
      IF sy-subrc = 0.
        it_vepo2-exidv = it_vepo1-exidv.
        MODIFY it_vepo2 TRANSPORTING exidv
           WHERE venum = it_vepo1-venum .
      ENDIF.
    ENDLOOP.
    DELETE it_vepo2 WHERE exidv IS initial.
    it_vepo[] = it_vepo2[].
TR03 Replace end
  ENDIF.
build process table
  PERFORM move_to_table.
ENDFORM.   "select_data_down
*&      Form  select_data_up
      select data if selecting from van/pallet up
FORM select_data_up.
  IF NOT s_vanno IS INITIAL.
  if van then select van numbers and hence pallet numbers
    SELECT * FROM zvantr INTO TABLE t_vantr
                          WHERE zvan_no IN s_vanno.
                        and   vstel   eq p_vstel."TR01-
    IF NOT t_vantr[] IS INITIAL.
      SORT t_vantr BY zvan_id zvan_no vstel zpallet_no.  "SUM
      SELECT * FROM zpallettr INTO TABLE t_pallettr
                              FOR ALL ENTRIES IN t_vantr
                              WHERE zpallet_no EQ t_vantr-zpallet_no
                                AND zdep_point IN s_deppnt. "Jvdm01
                            and   vstel      eq p_vstel."TR01-
    ENDIF.
  ELSE.
  otherwise can get pallet numbers directly
    SELECT * FROM zpallettr INTO TABLE t_pallettr
                            WHERE zpallet_no IN s_palno
                              AND zdep_point IN s_deppnt.   "Jvdm01
                          and   vstel      eq p_vstel."TR01-
  ENDIF.
  IF NOT t_pallettr[] IS INITIAL.
  from the pallet nos. we can select the handling units
    SORT t_pallettr BY zpallet_id zpallet_no vstel exidv.   "SUM
    SELECT * FROM vekp INTO TABLE t_vekp
                       FOR ALL ENTRIES IN t_pallettr
                       WHERE exidv EQ t_pallettr-exidv
                       AND   exidv NE space
                       AND   exidv IN s_exidv               "TR03+
                       AND ( exida = 'E'                    "TR01+
                       OR    exida = 'F' ).                 "TR01+
  ENDIF.
  SORT t_vekp BY venum.                                    "SUM
  IF NOT t_vekp[] IS INITIAL.
  build vbeln range from t_vekp.
    LOOP AT t_vekp.
      r_del-sign = 'I'.
      r_del-option = 'EQ'.
      r_del-low = t_vekp-vpobjkey.
      APPEND r_del.
    ENDLOOP.
  select all deliveries from LIKP that correspond to HU's
   SELECT * FROM likp INTO TABLE t_likp
                      WHERE vbeln IN r_del
                      AND   wadat IN s_wadat
                      AND   lfart IN s_lfart.
ENDIF.
MB01- START
   SELECT vbeln lgtor route wadat
                FROM likp INTO TABLE it_likp
                    WHERE vbeln IN r_del
                    AND   wadat IN s_wadat
                    AND   lfart IN s_lfart.
    SELECT vbeln vstel lgtor route wadat
           zzroute2lgtor zz2route zzexproute zzroute2 anzpk "MB01-+
             FROM likp INTO CORRESPONDING FIELDS OF TABLE it_likp
                       WHERE vbeln IN r_del
                       AND   lfart IN s_lfart
                       AND   wadat IN s_wadat               "MB01-+
                       AND   lfdat IN s_lfdat.              "MB01+
MB01- END
  ENDIF.
  IF NOT it_likp[] IS INITIAL.
    SORT it_likp BY vbeln .                                   "SUM
  select sales document headers from VBUK
   SELECT * FROM vbuk INTO TABLE t_vbuk
                 FOR ALL ENTRIES IN t_likp
                 WHERE vbeln EQ t_likp-vbeln.
    SELECT vbeln wbstk kostk
              FROM vbuk INTO TABLE it_vbuk
                 FOR ALL ENTRIES IN it_likp
                 WHERE vbeln EQ it_likp-vbeln.
    SORT it_vbuk BY vbeln.                                   "SUM
  select all relevant delivery items from LIPS
   SELECT * FROM lips INTO TABLE t_lips
                 FOR ALL ENTRIES IN t_likp
                 WHERE vbeln EQ t_likp-vbeln
                 AND   pstyv NE 'ZPAC'
                 AND   pstyv NE 'ZGDP'                     "TR02+
                 AND   lfimg GT 0.                         "TR01+
    SELECT vbeln posnr pstyv matnr charg
                      FROM lips INTO TABLE it_lips
                      FOR ALL ENTRIES IN it_likp
                      WHERE vbeln EQ it_likp-vbeln
                      AND   pckpf NE 'B'       "cannot be packed  "AS05
                    AND   pstyv NE 'ZPAC'                       "AS05
                    AND   pstyv NE 'ZGDP'                "TR02+ "AS05
                      AND   lfimg GT 0.                     "TR01+
  ENDIF.
  IF NOT it_lips[] IS INITIAL.
    SORT it_lips BY vbeln posnr.                              "SUM
  select all sales document line items from VBUP
   SELECT * FROM vbup INTO TABLE t_vbup
                 FOR ALL ENTRIES IN t_lips
                 WHERE vbeln EQ t_lips-vbeln
                 AND   posnr = t_lips-posnr.
Start of changes by ANV SR#11523
MB01 - START
join vttp with vttk to obtain leg indicator
   SELECT tknum tpnum vbeln
                 FROM vttp INTO TABLE it_vttp
                 FOR ALL ENTRIES IN it_lips
                 WHERE vbeln = it_lips-vbeln.
    SELECT vttptknum vttptpnum vttpvbeln vttklaufk
                  FROM vttp INNER JOIN vttk
                  ON vttptknum = vttktknum
                  INTO  TABLE it_vttp
                  FOR ALL ENTRIES IN it_lips
                  WHERE vttp~vbeln = it_lips-vbeln
                  AND   vttk~tplst IN s_tplst.
MB01 - END
End of changes by ANV SR#11523
    SELECT vbeln posnr lvsta
                FROM vbup INTO TABLE it_vbup
                FOR ALL ENTRIES IN it_lips
                  WHERE vbeln EQ it_lips-vbeln
                  AND   posnr = it_lips-posnr.
    SORT t_vbup BY vbeln posnr.                                "SUM
  select corresponding handling unit ID's (venum)
   SELECT * FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE t_vepo
                 FOR ALL ENTRIES IN t_lips
                 WHERE vbeln = t_lips-vbeln
                 AND   posnr = t_lips-posnr
                 AND   matnr = t_lips-matnr
                 AND   charg = t_lips-charg.
    SELECT venum vepos vbeln posnr
    FROM vepo APPENDING CORRESPONDING FIELDS OF TABLE it_vepo
                     FOR ALL ENTRIES IN it_lips
                     WHERE vbeln = it_lips-vbeln
                     AND   posnr = it_lips-posnr
                     AND   matnr = it_lips-matnr
                     AND   charg = it_lips-charg.
*{   INSERT         UKMK900355                                        1
    it_vepo2[] = it_vepo[].                                 " DS01
    PERFORM replace_highest_hu.                             " DS01
    it_vepo[] = it_vepo2[].                                 " DS01
*}   INSERT
  ENDIF.
build process table
  PERFORM move_to_table.
ENDFORM.   "select_data_up
*&      Form  move_to_table
      move data to processing table
FORM move_to_table.
  LOOP AT it_vepo.
    CLEAR t_data_tab.
  delivery lines.
    CLEAR w_lips.
    READ TABLE it_lips WITH KEY vbeln = it_vepo-vbeln
                               posnr = it_vepo-posnr
                               INTO w_lips BINARY SEARCH.     "SUM
    MOVE-CORRESPONDING w_lips TO t_data_tab.
  sales document line items
    CLEAR w_vbup.
    READ TABLE it_vbup WITH KEY vbeln = it_vepo-vbeln
                               posnr = it_vepo-posnr
                               INTO w_vbup BINARY SEARCH.     "SUM
  if w_vbup-kosta = space.                   "TR01-
    not relevant for picking
    delete t_vepo.                           "TR01-
    continue.                                "TR01-
  else.                                      "TR01-
    MOVE-CORRESPONDING w_vbup TO t_data_tab.
  endif.                                     "TR01-
  sales doc header
    CLEAR w_vbuk.
    READ TABLE it_vbuk WITH KEY vbeln = it_vepo-vbeln
                           INTO w_vbuk   BINARY SEARCH.       "SUM
    MOVE-CORRESPONDING w_vbuk TO t_data_tab.
  delivery header
    CLEAR w_likp.
    READ TABLE it_likp WITH KEY vbeln = it_vepo-vbeln
                           INTO w_likp BINARY SEARCH.         "SUM
    MOVE-CORRESPONDING w_likp TO t_data_tab.
MB01 - START
  DATA: w_routetype TYPE i. "0=non-global,1=1st route,2=2nd
route,3=both
At this point move DOOR2 if it falls within the global route scenario
and the door2 is satisfies the selection criteria for door
1.   Does delivery fall within global route scenario
    CLEAR w_routetype.
    IF  w_likp-zz2route = 'Y' .
1.a. First route - does door1 satisfy the selection criteria
      IF w_likp-lgtor IN s_lgtor.
        w_routetype = 1.
        MOVE w_likp-zzexproute TO t_data_tab-route.
1.b. Second route - does door2 satisfy the selection criteria
      ELSEIF w_likp-zzroute2lgtor IN s_lgtor.
  here we need to move door2 to lgtor
        w_routetype = 2.
        MOVE w_likp-zzroute2lgtor TO t_data_tab-lgtor.
        MOVE w_likp-zzroute2 TO t_data_tab-route.
      ENDIF.
If both routes satsify the criteria, append for 2nd leg  ***REVISIT!
      IF w_likp-lgtor IN s_lgtor AND w_likp-zzroute2lgtor IN s_lgtor.
        w_routetype = 3.
      ENDIF.
    ENDIF.
MB01 - END
Start of changes by ANV SR#11523
MB01 - If the delivery falls within the global route scenario... need
to select either preliminary shipment leg OR subsequent leg
when laufk= 1 (prelim) and linked to route1, if laufk = 2 (subseq) &
linked to route2
  Shipment Number
    SORT it_vttp BY vbeln laufk.
    CLEAR w_vttp.
    CASE w_routetype.
      WHEN 0.
        READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
                               INTO w_vttp BINARY SEARCH.
      WHEN 1.
        READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
                                    laufk  = '1'
                               INTO w_vttp BINARY SEARCH.
      WHEN 2.
        READ TABLE it_vttp WITH KEY vbeln = it_vepo-vbeln
                                    laufk  = '3'
                               INTO w_vttp BINARY SEARCH.
      WHEN 3.  "REVISIT
    ENDCASE.
    MOVE w_vttp-tknum TO t_data_tab-tknum.
MB01 - END
End of changes by ANV SR#11523
  select handling unit info using vepo entry
    CLEAR w_vekp.
    IF t_vekp[] IS INITIAL.
      SELECT SINGLE * FROM vekp INTO w_vekp
                                WHERE venum = it_vepo-venum.
    ELSE.
      READ TABLE t_vekp WITH KEY venum = it_vepo-venum
                                 INTO w_vekp  BINARY SEARCH.     "SUM
      IF sy-subrc NE 0.
        SELECT SINGLE * FROM vekp INTO w_vekp
                        WHERE venum = t_vepo-venum.
      ENDIF.
    ENDIF.
    MOVE-CORRESPONDING w_vekp TO t_data_tab.
*{   INSERT         UKMK900355                                        2
  WM status for HU                                              "AS03
    SELECT SINGLE * FROM zhu_to_link WHERE lgnum EQ w_vekp-lgnum"AS03
                                     AND   exidv EQ w_vekp-exidv."AS03
    IF  sy-subrc EQ 0.                                      "AS03
      IF zhu_to_link-zpick_comp EQ space.                   "AS03
        t_data_tab-lvsta = 'B'.                             "AS03
      ELSE.                                                 "AS03
        t_data_tab-lvsta = 'C'.                             "AS03
      ENDIF.                                                "AS03
    ENDIF.                                                  "AS03
*}   INSERT
  select pallet / van load information                     "Jvdm01-
   SELECT SINGLE zpallet_no zcount_check FROM zpallettr    "Jvdm01-
                            INTO (t_data_tab-zpallet_no,   "Jvdm01-
                                  t_data_tab-zcount_check) "Jvdm01-
                            WHERE exidv EQ w_vekp-exidv.   "Jvdm01-
    PERFORM read_pallet.                                     "MB01+
   SELECT SINGLE zpallet_no zcount_check zdep_point        "Jvdm01+
                            FROM zpallettr                 "Jvdm01+
                            INTO (t_data_tab-zpallet_no,   "Jvdm01+
                                  t_data_tab-zcount_check, "Jvdm01+
                                  t_data_tab-zdep_point)   "Jvdm01+

Similar Messages

  • Regarding header item details on same screen

    Hi All,
    I have 2 internal tables with header and item details and i want to show them on same screen in ALV format.
    I need to show header on first half of screen and when user double click on 1 line, corresponding item details needs to be shown on lower screen part.
    Please help me with code for the requirement.
    Thanks in advance.

    use OO ALV. You will find many concepts by using the search input field + button

  • Header and item details

    Hi all,
          How to link Header and Item details
                                                    Ranjith

    Hi,
    The Line item table always have the header tables key as one of the key field. so u can use it.
    for eg : VBAK-vbeln and VBAP-vbeln
    Vbeln is the link between sales header and item table.
    Hope this helps.

  • Same field on Header and Item level with same data

    Hi Experts,
    I want enter value in WEB UI Header level Screen filed and the same value I have to see in same filed which has added to item level WEB UI Screen. Is Same field on Header and Item with data copying functionality supports by the CRM WEB UI?
    Thanks in Advance
    Edited by: sakthidharan acc on Jan 31, 2012 10:25 AM

    Hi Leon,
    can you please explain me how can i read the value of parent entity and make it appear at the item level?
    Please help me in this regard
    Its urgent.
    Iam the beginner , so that is the reason iam asking many questions , please help me
    Thanks and Regards,
    Sak

  • Check box in header and item

    Hi,
         I have a small problem regarding the checkboxes in the hierarchical Display.The challenge is i am unable to get the checkboxes for both header and item details in the hierarchy display.
                          Either header or item is getting the checkbox not both. Also, if a header checkbox is checked all the items corresponding to it should get checked automatically.
                        So please let me know the solution to this mystery.

    Hi,
    1.  If you want to calculate tax in FB50 , you have to select teh Calculate tax indicator in the  header & you have to give Tax code in teh respective line .
    Even if you give tax code in the line item  without tick the Calculate Tax indicator in the header system won't calculate tax.
    2.Tax codes are created  under teh TAX procedure.Thisd tax procedure is assgined to country.
    So  the tax codes you are creating are country specific.
    chandra

  • Same condition type on header and item level = printing problem

    Hi
    I have a customer using some condition types on both item level and header level in quotations, orders, invoices ...
    In the pricing procedures it is customized (V_T683S-DRUKZ) that the conditions must be printed on header level (that is at the bottom of the documents).
    My job is to make the Smartform to print the documents, and I want it of course to be as close to SAP standard as possible.
    SAP standard will print these conditions on header level even if the conditions are at item level, but my customer wants the conditions created on header level to be printed on header level and conditions created on item level to be printed on item level.
    I'm no pricing expert, so my question is:
    Will it be fair if I tell the customer that using the same condition types on header and item level is bad practices - or at least bad karma?
    Best regards
    Thomas Madsen Nielsen

    Hi Shiva Ram and Madhu
    I have no problem understanding header vs. item conditions, so I really don't see anything in oss note 876617, that is relevant in this case.
    Madhu - I do not agree that everything is fine. My issue is that I want to stick as closely to SAP standard customizing as possible. In SAP standard customizing of a condition type you can use the flag V_T683S-DRUKZ to determine if the condition should be printed on header OR item level - you can not choose both header AND item level.
    I have a SAP standard smartform using two functions modules for reading header and item conditions. RV_PRICE_PRINT_ITEM and RV_PRICE_PRINT_HEAD. These function modules are based on the DRUKZ customizing flag and a condition marked for printing on header level will be supplied by RV_PRICE_PRINT_HEAD even when the condition is on item level.
    My point is: SAP standard customizing does not support printing of same condition on both header and item level. I can of course write tons of code to work around this problem, but that would be bad practices

  • In LSMW using BAPI Scenario, how to assign the same file to HEADER and ITEM

    Hi,
    i got a problem when we are in ASSIGN FILES step how to assign the same file to both HEADER and ITEM Structures?

    Hi,
    When defining the file in specify files step check the option 'Data for Multiple Source Structures'.
    Hope it helps.
    Thanks,
    Mahesh

  • Header data and item data into same internal table

    Hi Experts,
    I WANT TO KNOW THE LOGIC TO POPULATE HEADER DATA AND ITEM DATA INTO SAME INTERNAL TABLE AND AGAIN DOWNLOAD THE SAME TO EXCEL FILE .Output file should be displayed like this format
    Header1  rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.
    Item1  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Item2  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Header2: rectyp ,hdnum ,sbank ,bankl ,accnr , paytp , crda ,iso.
    Item1  : rectyp ,valut ,cknum ,amount,bankl,accnr,pdate,bnktc.
    Thanks
    Moderator message: Please do not use all upper case in the future.
    Edited by: Thomas Zloch on May 12, 2010 3:10 PM

    Hi,
    for example we have 3 internal tables 
    1> it_header  2>it_items   3>it_final (which contains all the header and item fields)
    once  it_header   it_items  are filled
    loop at it_items.
    read table it_header with key xyz = it_item-xyz.
    if sy-subrc = 0.
      here move all the header fields to it_final like below.
    it_final -xfield  = it_header-xfield.
    endif.
      here move all the item fields to it_final like below.
    it_final -yfield  = it_item-yfield.
    append it_final.
    clear it_final.
    endloop.
    now header and item fileds will be fillled in it_item

  • How to create a new field for Q3 - QM notification in Header and item level

    Dear All,
    l
               Sub: How to create a new field for Q3 - QM notification in Header and item level
    Ref. the link --> Quality Notification
    We want to create a new field in header level and item level.
    As per the thread the solution is given below.
    In the IMG Config: Quality Management -> Quality Notification -> Notification Types -> Define screen areas for notification types Then Choose 'Define screen areas' Then Click on 'New entries' button Now, select the relevant Notification Type and click in 'Enter'. Select the 'Iten Cases' register and remember to setup the Tabstrip Header, Icon, etc. Set the 'Tabstrip active' flag. Then Save.
    Quality Notification -> Notification Types -> Define screen areas for notification types
    WE ARE UNABLE TO FIND IN CUSTOMIZATION PATH --> DEFINE SCREEN AREAS FOR NOTIFICATION TYPES.
    Please help.
    Question No. 2 :
    THE REQUIREMENT IS GIVEN BELOW.
    We want to hide the field in Q3 - QM Notification
    In header --> Reference tab --> Item (sub heading) --> "DEFECT LOCATION" FIELD TO BE ELIMINATED (HIDE)
    Ref the link --> Quality notification
    The solutiion is given below.
    Hi Sami,
    We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
    Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
    Hope this will suffice your requirement.
    Kindly ask me if you need any other details.
    Thanks & Regards,
    Srinivas.D
    Hi Sami,
    We can hide the collumns using the Transaction OQM1 and Program Name SAPLIQS0.
    Lets say Defect location need to be hidden, the field TXTCDOT need to have the radio button HIDE.
    Hope this will suffice your requirement.
    Kindly ask me if you need any other details.
    Thanks & Regards,
    Srinivas.D
    By double clicking the "DEFECTIVE QUANTITY (EXTERNAL), WE COULD NOT GET --> field TXTCDOT .
    Plese do the needful.
    We are using ECC6.0 Ehp3 and Ehp4.
    With Best Regards,
    Raghu Sharma

    Dear Pushpa,
    Transaction Code :SHD0 is working fine.
    Please accept my sincere thanks for your sharing your Knowledge.
    I am able to fulfill my
    Regarding the enhancement, I have not tried.
    Once I will complete, I will award the fulll marks to you.
    With Best Regards,
    Raghu Sharma

  • How can we revise the pricing both at header and item level of sales order?

    Dear All,
      Now there's one issue of the pricing to me. i want to revise the pricing both at header and item level of sales order. but after i finished the cutomize and tested it, it's more different as i thought. i found that the pricing can revise at the one side only,for example, if i revise the pricing at item level and it's grey and can't be revised at the header. on the other hand, it's the same result what's happened at item.
      So, in my opinion, we can't revise the pricing both at header and item, right? if not, please give me more advices and teach me how to solve the problem. thanks a lot.

    Dear Lakshmipathi,
      Thanks a lot for your kindly and useful answer for me and I learn more for the pricing technology.
      I didn't notice the way that you reminded ago therefore I also saw the button at the condition tab. And your suggestion makes me know more.
      And I had tested the way that you said, I met with a question. Below is my opinion for my testing.
      I had created one SO and the pricing was $10, then I revised the pricing from 10 to 15 by VK11. It can't be updated automatically at SO and I must update it manually by clicking the "Update" button. This is OK for my testing, but I have another question to disturb you for the use of "Active" button. When I click the button and nothing is responsed, it's quite different what you said. So, please give more detail for the Active button. Thanks a lot.

  • Header and Item table - Form Design Question

    Hi All,
    I have a header table and Item table. For every record in the header table I have multiple records in the item table. I want to have a adobe form in the following way
    1. A new page starts for every record in the header table and Items in the item table for this header record can span multiple pages with the same header information.
    2. When all the items are displayed for that particular header record, a new page should start for the next header record.
    I created one internal table in the following way
    Header_field1 Header_field2 Item_table(with all the items for this header record)
    Header_field1 Header_field2 Item_table(with all the items for this header record)
    I am not sure how to use a table for this scenario (Should It be a nested table?).
    Please provide me some ideas.
    Thanks,
    Ganesh.

    Hi Balasubramani,
    I made some changes and have the following now. Can you please let me know how I can achieve page break for every BP_NUMBER.
    I have a nested table like the one below.
    Main table u2013 Has header and Items information. Every header record has some header information like BP number, name and all line items for that BP in a nested table .
    IT_HEADER:
    BP_NUMBER     BP_NAME           IT_ITEMS(Items table)
    BP_NUMBER     BP_NAME           IT_ITEMS
    BP_NUMBER     BP_NAME           IT_ITEMS
    To display this information I created the following
    Subform1 u2013 overflow u2013bound to $record.IT_HEADER.DATA[*] u2013 (Repeat sub form for
    |                                             each data item)
    |->Header sub form u2013 Positioned
    |     |
    |     |-> Text Field u2013 bound to BP_NUMBER
    |
    |
    |->Item sub form -
         |     
         |->Item Table u2013 bound to IT_ITEMS
              |
              |->Data u2013 bound to IT_ITEMS.DATA[*] u2013(Repeat row for each data item)
    In the output BP number in the first record of IT_HEADER gets displayed and then all the Item records in IT_ITEMS for that BP get displayed. This is repeated all the records in IT_HEADER which is perfectly fine.
    Please provide me some suggestions to solve the following issues I am having
    1.     I need a page break between records of IT_HEADER. I want the new subform1 for the next header record to start in a new page. I tried conditional break option, on the only field BP number in header sub form. I have two master pages and two body pages. All the above information is in master page 2 and body page 2.  I am also not sure what to select in the TO section of the conditional break screen.
    2.     When there is an overflow in IT_ITEMS I need the Header sub form to be shown in the next page too.
    Thanks,
    Ganesh.

  • Header and Item data in a module pool

    Hi Friends,
    I designed a screen in that i have header data and item data.
    Here in my screen header i have vendor number,Vendor name,
    bank Name, Branch, LC value and Due date fields.
    and for item details i have to take table control.In the item details i have the fields Sl No, PO Number and Po Value.
    and Two push buttons i need to put.SAVE and CANCEL.
    When i click on SAVE all my screen details should be saved in a ZTABLE and should generate a LCDOCUMENT-Number from the system.
    So my question is shell i take the two tables for header and item data or one is enough and if i take two tables(one is header and one is item data) how i write the logic to store into the ztables.
    How can i proceed.Plz provide me with ur inputs
    Thanks and Regards.

    Hi!
    you have to take one table.....in which u have to move the header and item data into that b'coz according to the header data the items are to be displayed.......
    select the data for which ever tables they came and then take a final table in which include all the fields of header and item .loop on all the tables from which data u have taken and inside it move the data of those fields into the fields of the final table.
    In the ALV u need to call the function module to display the ALV with that final table in which ur all data is there and prepare a field catalog of those fields you want to display in the item list.
    for example a sample code is there...
    types:
      begin of type_s_vbak,
        vkorg type vbak-vkorg,             " Sales Organization
        aufnr type vbak-aufnr,             " Sales Order Number
        auart type vbak-auart,             " Sales Order Type
        kunnr type vbak-kunnr,             " Customer Number
        vbeln type vbak-vbeln,             " Sales Document
        knumv type vbak-knumv,             " Number of Document Condition
      end of type_s_vbak.                  " BEGIN OF TYPE_S_VBAK
    types:
      begin of type_s_konv,
        kwert type konv-kwert,             " Condition Value
        kbetr type konv-kbetr,             " Rate (Condition Amount)
        knumv type konv-knumv,             " Number of Document Condition
        kschl type konv-kschl,             " Condition Type
      end of type_s_konv.                  " BEGIN OF TYPE_S_KONV
    types:
      begin of type_s_material,
        kunnr      type vbak-kunnr,          " Customer Number
        matnr      type vbap-matnr,          " Material Number
        arktx       type vbap-arktx,          " Material Description
        steuc       type marc-steuc,          " Fiscal Classification
        kwmeng   type vbap-kwmeng,         " Quantity
        knumv      type vbak-knumv,          " Number of Document Condition
        vbeln        type vbak-vbeln,          " Document Number
        kwert       type konv-kwert,          " Condition Value
        total         type p length 14 decimals 2,
                                           " Total
        ipitype  type p length 9 decimals 3,
                                           " IPI Type
        ipivalue type konv-kwert,          " IPI Value
      end of type_s_material.              " BEGIN OF TYPE_S_MATERIAL
    data:
      fs_vbak type type_s_vbak.
    data:
      fs_mati type type_s_material.
    data:
      fs_konv type type_s_konv.
    data:
       t_vbak like
    standard table
           of fs_vbak.
    data:
       t_konv like
    standard table
           of fs_konv.
    data:
       t_mati like
    standard table
           of fs_mati.
    loop at t_konv into fs_konv where kschl eq 'ZPNF'.
        move fs_konv-kwert to fs_mati-kwert.
        modify t_mati from fs_mati
        transporting kwert
        where knumv eq fs_konv-knumv.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying Total Field of Material Table.
      loop at t_mati into fs_mati.
        w_total = fs_mati-kwmeng * fs_mati-kwert.
        move  w_total to fs_mati-total.
        modify t_mati from fs_mati
        index sy-tabix
        transporting total.
        clear w_total.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying IPI-Type Field of Material Table.
      loop at t_konv into fs_konv where kschl eq 'IPI3'.
        w_total = fs_konv-kbetr div 10.
        move w_total to fs_mati-ipitype.
        modify t_mati from fs_mati
        transporting ipitype
        where knumv eq fs_konv-knumv.
        clear w_total.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying IPI-Value Field of Material Table.
      loop at t_konv into fs_konv where kschl eq 'IPI3'.
        move fs_konv-kwert to fs_mati-ipivalue.
        modify t_mati from fs_mati
        transporting ipivalue
        where knumv eq fs_konv-knumv.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    and then fill the fieldcatalog and display the ALV
    Edited by: Richa Tripathi on Apr 15, 2009 3:28 PM

  • How to make pricing field as output only in sales order header and item lev

    Hi ,
    I want to make the field PRICING DATE as output only both at header and item level. How can i do pls guide me in detail.
    Regards
    Sunaina

    Hi Sunaina ,
    Through User Exit you get this requirement plese take help of ABAPer to activate the user exit according to your requirement.
    Try With this User Exit
    Program MV45AFZZ
    USEREXIT_FIELD_MODIFICATION
    This user exit can be used to modify the attributes of the screen fields.
    To do this, the screen fields are allocated to so-called modification groups 1 - 4 and can be edited together during a modification in ABAP. If a field has no field name, it cannot be allocated to a group.
    The usage of the field groups (modification group 1-4) is as follows:
    Modification group 1: Automatic modification with transaction MFAW
    Modification group 2: It contains 'LOO' for step loop fields
    Modification group 3: For modifications which depend on check tables or on other fixed information
    Modification group 4: is not used
    The FORM routine is called up for every field of a screen. If you require changes to be made, you must make them in this user exit.
    This FORM routine is called up by the module FELDAUSWAHL.
    See the Screen Painter manual for further information on structuring the interface.
    I hope it will help you,
    Regards,
    Murali.

  • Header and Item Text is not replicating from ECC6.0 to SAP CRM 7.0

    Hi SAP Experts,
    When the text is added at header and item in Texts tab from SAP CRM then this is transferring into ECC6.0 but the otherway round is not working i.e., from ECC6.0 to SAP CRM.
    Would appreciate for giving solution.
    Thanks in advance.
    Best Regards
    Succhi

    Hi Succhi
    There are a number of oss notes to check: 1169856, 720147, 550343, and 549209
    Please make sure that the text tables are included in the filter as per note 720147.
    Also include the configuration as per note 549209.
    It is necessary that the same text types exist in both systems so please review the configuration carefully.
    I hop this helps.
    Best Regards
    Gavin

  • Delivery tolerance at header and item level in sales order

    Dear All,
    My client wants to maintain delivery tolerance at both header and item level. NOTE: The tolerance at sales order header is different than the delivery tolerance at sales order item.
    eg if i maintain 3% plus and minus tolerance at item, the header level tolerance can be 2%.
    Also if there are more than 1 line items, the system should give warning message, when it finds that the delivery tolerance at item level can be maintained but that of the header level cannot be maintained and vice varsa.
    Awaiting an early help and thankful for the same in advance.
    Regards,
    Avnesh Kamdar

    Hi Avnesh,
    Delivery tolerance can be made in the customer master,sales org data ---delivery tab.
    Delivery tolerance is always at item level.
    Reward points if it helps.
    Regards
    Karan

Maybe you are looking for

  • Data storage in BPC7 NW

    In BPC 7.0 NW , I understand the BI CUBE as well BPC Application is used. Please correct me if I am wrong. In the above situation will the data be stored in BI Cube ( in SAP data base) or in BPC SQL data base. Appreciate inputy..

  • Can't share video recordings via email

    It works great on my gmail and AOL accounts but I can't send recorded videos through my yahoo account even on WIFI. It just stays in the outbox forever then it states email is unable to send... is anyone having this issue?

  • Oracle Virtual Private Database (VPD), Column Level Security

    Hello, About Oracle Virtual Private Database (VPD), is it possible to set a Column Level Security without setting a Row Level Security (without using any predicate)? Thanks, Herve.

  • Getting message for every record while pressing down arrow key:apps form

    Hi, when i query the form and when I am going through the records by pressing the down arrow of the keyboard I am getting the message 'Do you want to Save the records' for every record even though i did not update any record How to avoid the message?

  • Where is the portal30_sso plsql stored package security mechanism ?

    Hi All, I'm trying to make new signon page thru a plsql stored package routine test.login , to be recorded in wwsso_ls_configuration_info$ table and therefore to be called by the user browser on each authentication ( i.e. http://machine:port/pls/dbna