Alv table line F2 details

when F2 is pressed in ALV, a pop-up window shows, giving the details of that table line.
how do I do the same in OO ALV report when F2 or double-click is used.

Please find the code:
FORM sub_show_detail USING uw_check TYPE boole_d.
  DATA: lt_fcat_main   TYPE lvc_t_fcat,
        lt_fcat        TYPE lvc_t_fcat,
        ls_fcat        TYPE lvc_s_fcat,
        ls_data        TYPE lvc_s_deta,
        ls_deta        TYPE lvc_s_detm,
        lw_layo        TYPE lvc_s_layo,
        lt_deta        TYPE lvc_t_detm,
        lw_main        TYPE zfd0r_invoice_analysis_strc,
        lw_count       TYPE lvc_index,
        lw_title       TYPE string.
  FIELD-SYMBOLS: <l_fcat> TYPE lvc_s_fcat,
                 <l_data> TYPE zfd0r_invoice_analysis_strc,
                 <l_cval> TYPE ANY,
                 <l_tval> TYPE ANY.
Get the Global Field Catalog.
  lt_fcat_main = gt_fieldcat.
Delete entries based on Invoice or F2 Invoice
  IF uw_check = abap_true.
    DELETE lt_fcat_main WHERE emphasize EQ space
                          AND fieldname NE 'GERNR'.
    lw_title = text-f30.
  ELSE.
    DELETE lt_fcat_main WHERE emphasize >< space.
    lw_title = text-f29.
  ENDIF.
Get the Detail Display Fieldcatalog
  ls_fcat-fieldname = 'COLUMNTEXT'.
  ls_fcat-ref_table = 'LVC_S_DETA'.
  ls_fcat-key       = abap_true.
  ls_fcat-coltext   = text-f27.
  ls_fcat-outputlen = 20.
  APPEND ls_fcat TO lt_fcat.
  CLEAR ls_fcat.
  ls_fcat-fieldname = 'VALUE'.
  ls_fcat-ref_table = 'LVC_S_DETA'.
  ls_fcat-coltext   = text-f28.
  ls_fcat-outputlen = 35.
  APPEND ls_fcat TO lt_fcat.
  CLEAR ls_fcat.
Define layout
  lw_layo-no_toolbar = abap_true.
Fill the Main table
  LOOP AT gt_main ASSIGNING <l_data>.
    lw_count = lw_count + 1.
    DO.
      READ TABLE lt_fcat_main ASSIGNING <l_fcat> INDEX sy-index.
End of All Fields -> EXIT
      IF sy-subrc >< 0.
        EXIT.
      ENDIF.
      ASSIGN COMPONENT <l_fcat>-fieldname
              OF STRUCTURE <l_data> TO <l_cval>.
      IF sy-subrc = 0.
        ls_data-columntext = <l_fcat>-scrtext_l.
        ls_data-value = <l_cval>.
        APPEND ls_data TO ls_deta-detailtab.
        CLEAR: ls_data.
      ENDIF.
    ENDDO.
Generate the Index
    ls_deta-blockindex = lw_count.
append the display data.
    APPEND ls_deta TO lt_deta.
    CLEAR: ls_deta.
  ENDLOOP.
Call The Item Detail FM.
  CALL FUNCTION 'LVC_ITEM_DETAIL'
       EXPORTING
            i_title         = lw_title
            it_fieldcatalog = lt_fcat
            is_layout       = lw_layo
       TABLES
            t_outtab        = lt_deta.
Hope That Helps
Anirban M.

Similar Messages

  • More ALV table lines

    Hi!
    My ALV table contains by default 10 visible lines. How can I add more lines to the table to display at once, like 20 lines?
    Thank you
    Tamas

    You can set the number of lines in the WDDOINIT method of your view.
    (The following example uses an alv component named ALV_GRID.)
    * WZ Instantiate ALV component                                   *
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv_grid( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    * WZ get the (config model)                                      *
      DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_interfacecontroller =   wd_this->wd_cpifc_alv_grid( ).
      DATA lv_value TYPE REF TO cl_salv_wd_config_table.
      lv_value = lo_interfacecontroller->get_model(  ).
    * Table Settings                                                 *
      CALL METHOD lv_value->if_salv_wd_table_settings~set_visible_row_count
        EXPORTING
          value = 20.  " or -1 for dynamic
      CALL METHOD lv_value->if_salv_wd_table_settings~set_footer_visible
        EXPORTING
          value = 1.
    By the way, setting the value to -1 will make the number of rows dynamic - try it.
    ...Mike

  • How to process Line Selection on ALV Table in ABAP WebDynpro

    Hi there,
    I have a view with an ALV table whose context node retrieves its data from a Service Call for a method.
    The method provides certain data of a database table which the ALV displays.
    Now I would like to be able to select one row of that ALV table and after pressing a button or doubleclicking on the row or whatever a different view (as for me it is also ok on the same view) should appear to display the details of that selection.
    I only need to know how to retrieve the selected data.
    Or its index within the internal table.
    I am already looking for hours for a useful thread and actually there is one which obviously is about a similar issue apart from the multiple selection part: 
    How to process multiple row selection in ALV table in Wendynpro ABAP? Help!
    but i am afraid that i don't understand it. Or at least I misunderstand it since it does not work with me.
    The system example mentioned in the thread does not help me either because it somehow does not correspond to my needs, does it?
    It would be GREAT if somebody could help me with that. Please keep it simple for I am not an expert in webdynpro yet (obviously ^^) and also please explain in detail what I have to do with the context nodes since I am not sure whether the selection is stored in my already existing node or whether I need a special one for that.
    Thanks!!
    christina

    Hi Christina,
    If you just want to get one column data of the line that user clicked, use the Web Dynpro Code Wizard to Read Context of attibute you needed, then you will get code as follow:
    * Define data for read attribute
        node_alv TYPE REF TO if_wd_context_node,
        elem_alv TYPE REF TO if_wd_context_element,
        stru_alv TYPE if_view_display=>element_alv ,
        item_column_name  LIKE stru_alv-column_name.
    * navigate from <CONTEXT> to <ALV> via lead selection
      node_alv = wd_context->get_child_node( name = if_view_display=>wdctx_alv ).
    * get element via lead selection
      elem_alv = node_alv->get_element(  ).
    * get single attribute
      elem_alv->get_attribute(
        EXPORTING
          name =  `COLUMN_NAME'
        IMPORTING
          value = item_column_name ).
    The value of column_name is stored in item_column_name.
    If you need the index that the user clicked, try this:
    * Definition of field symbol for index
      FIELD-SYMBOLS : <fs_index> TYPE data.
    * Get the selected index
      ASSIGN r_param->index->* TO <fs_index>.
    The index of clicked line is stored in field symbol <fs_index>.
    Hope it will help.
    Best Regards,
    Stephanie

  • Separatate column of Web Dynpro ALV table using a vertical line

    Hi Experts!
    I have Web Dynpro ALV table and  I have a requirement to add a colored vertical line between two columns as a separator.   
    Is this possible? Is it possible to adjust border width of individual cells?
    I would be grateful for any ideas you may able to share.

    Both could be achieved by creating custom theme. But those changes will be applicable to tables and ALVs in your applications.
    Nitesh

  • Alv Report for invoice details

    Dear All,
                 I need to develop one alv report for following details. i developed coding for this requirment but i am getting some error.kindley help me to how to move data from different internal table to final internal table. I used LOOP AT and READ Statement even i didn't get any output.
    kindley help me out.
    TYPES: BEGIN OF XT_TAB,
             LIFNR  LIKE LFA1-LIFNR,
             NAME1  LIKE LFA1-NAME1,
             STCD1  LIKE LFA1-STCD1,
             STCD2  LIKE LFA1-STCD2,
             STCD3  LIKE LFA1-STCD3,
             STCD4  LIKE LFA1-STCD4,
           END OF XT_TAB.
    TYPES: BEGIN OF YT_TAB,
            BUKRS LIKE BSEG-BUKRS,
            BELNR LIKE BSEG-BELNR,
            BUZEI LIKE BSEG-BUZEI,
            LIFNR LIKE BSEG-LIFNR,
            GJAHR LIKE BSEG-GJAHR,
           END OF YT_TAB.
    TYPES: BEGIN OF ZT_TAB,
            LIFNR  LIKE LFA1-LIFNR,
            NAME1  LIKE LFA1-NAME1,
            STCD2  LIKE LFA1-STCD2,
            BELNR  LIKE BSEG-BELNR,
            BUZEI  LIKE BSEG-BUZEI,
            GJAHR  LIKE BSEG-GJAHR,
           END OF ZT_TAB.
           I N T E R N A L   T A B L E   D E C L A R A T I O N S         *
    *-----Internal table to store data
    DATA: ITAB1   TYPE STANDARD TABLE OF XT_TAB INITIAL SIZE 0,
          WA_TAB1 TYPE XT_TAB.
    DATA: ITAB2   TYPE STANDARD TABLE OF YT_TAB INITIAL SIZE 0,
          WA_TAB2 TYPE YT_TAB.
    DATA:   ITAB  TYPE STANDARD TABLE OF  ZT_TAB  WITH HEADER LINE,
            WA_ITAB TYPE ZT_TAB,
            ITAB_FINAL2 TYPE STANDARD TABLE OF ZT_TAB.
    DATA: ITAB_TEMP1 TYPE STANDARD TABLE OF ZT_TAB  WITH HEADER LINE.
                    Selection Screen Declarations                        *
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN begin OF LINE.
    SELECTION-SCREEN COMMENT (23) text-003 FOR FIELD P_LIFNR.
    PARAMETERS P_LIFNR LIKE LFA1-LIFNR OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK bk1.
    START-OF-SELECTION.
          PERFORM XTRACT_DATA.
    END-OF-SELECTION.
    *-----Filling the Output table
      PERFORM populate_main_table.
          PERFORM BUILD_FIELDCATALOG.
         PERFORM SORTING.
          PERFORM BUILD_LAYOUT.
          PERFORM BUILD_ALV_GRID_DISPLAY.
         Form  XTRACT_DATA
    FORM XTRACT_DATA .
    *SELECT
          a~LIFNR
          a~NAME1
          a~STCD2
          b~BELNR
          b~BUZEI
          b~GJAHR
    INTO TABLE ITAB
    FROM LFA1 as a INNER JOIN BSEG as b
      ON  aLIFNR = bLIFNR
    WHERE  a~LIFNR = P_LIFNR.
    SELECT LIFNR
           NAME1
           STCD1
           STCD2
           STCD3
           STCD4
      FROM LFA1
      INTO TABLE ITAB1
      WHERE LIFNR = P_LIFNR.
    IF NOT ITAB1[] IS INITIAL.
        SORT ITAB1 BY LIFNR.
        SELECT BELNR
               BUZEI
               LIFNR
               GJAHR
    INTO TABLE ITAB2
          FROM BSEG
    FOR ALL ENTRIES IN ITAB1
    WHERE LIFNR = ITAB1-LIFNR.
    ENDIF.
    ENDFORM.                    " XTRACT_DATA
    *&      Form  POPULATE_MAIN_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_MAIN_TABLE .
       LOOP AT ITAB1 INTO WA_TAB1.
               ITAB-LIFNR = ITAB1-LIFNR.
               ITAB-NAME1 = ITAB1-NAME1.
               ITAB-STCD2 = ITAB1-STCD2.
       READ TABLE ITAB2 INTO WA_TAB2 WITH KEY LIFNR = WA_TAB1-LIFNR.
               IF sy-subrc = 0.
               ITAB-BELNR = ITAB1-BELNR.
               ITAB-BUZEI = ITAB1-BUZEI.
               ITAB-GJAHR = ITAB1-GJAHR.
               ENDIF.
      ENDLOOP.
      ENDFORM.                    " POPULATE_MAIN_TABLE
         Form  BUILD_FIELDCATALOG
    FORM BUILD_FIELDCATALOG .
      REFRESH t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 1.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Vendor Number'.
      wa_fcat-seltext_m = 'Vendor Number'.
      wa_fcat-seltext_l = 'Vendor Number'.
      wa_fcat-fieldname = 'LIFNR'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 2.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Vendor Name'.
      wa_fcat-seltext_m = 'Vendor Name'.
      wa_fcat-seltext_l = 'Vendor Name'.
      wa_fcat-fieldname = 'NAME1'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 3.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Vendor TIN Number'.
      wa_fcat-seltext_m = 'Vendor TIN Number'.
      wa_fcat-seltext_l = 'Vendor TIN Number'.
      wa_fcat-fieldname = 'STCD2'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 4.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Document No'.
      wa_fcat-seltext_m = 'Document No'.
      wa_fcat-seltext_l = 'Document No'.
      wa_fcat-fieldname = 'BELNR'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 5.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Item Number'.
      wa_fcat-seltext_m = 'Item Number'.
      wa_fcat-seltext_l = 'Item Number'.
      wa_fcat-fieldname = 'BUZEI'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 6.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Fiscal Year'.
      wa_fcat-seltext_m = 'Fiscal Year'.
      wa_fcat-seltext_l = 'Fiscal Year'.
      wa_fcat-fieldname = 'GJAHR'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
         Form  BUILD_LAYOUT
    FORM BUILD_LAYOUT .
    GD_LAYOUT-NO_INPUT = 'X'.
    GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    GD_LAYOUT-TOTALS_TEXT = 'TOTALS'.
    ENDFORM.                    " BUILD_LAYOUT
         Form  BUILD_ALV_GRID_DISPLAY
    FORM BUILD_ALV_GRID_DISPLAY .
    gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_top_of_page  = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
                is_layout               = gd_layout
                it_fieldcat             = t_fcat[]
                it_events               = gt_events
                is_print                = gd_prntparams
                it_sort                 = it_sortcat[]
                i_save                  = 'X'
           TABLES
                t_outtab                = ITAB
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    thanks and regards
    Murugesh

    TYPES: BEGIN OF XT_TAB,
             LIFNR  LIKE LFA1-LIFNR,
             NAME1  LIKE LFA1-NAME1,
             STCD1  LIKE LFA1-STCD1,
             STCD2  LIKE LFA1-STCD2,
             STCD3  LIKE LFA1-STCD3,
             STCD4  LIKE LFA1-STCD4,
           END OF XT_TAB.
    TYPES: BEGIN OF YT_TAB,
            BUKRS LIKE BSEG-BUKRS,
            BELNR LIKE BSEG-BELNR,
            BUZEI LIKE BSEG-BUZEI,
            LIFNR LIKE BSEG-LIFNR,
            GJAHR LIKE BSEG-GJAHR,
           END OF YT_TAB.
    TYPES: BEGIN OF ZT_TAB,
            LIFNR  LIKE LFA1-LIFNR,
            NAME1  LIKE LFA1-NAME1,
            STCD2  LIKE LFA1-STCD2,
            BELNR  LIKE BSEG-BELNR,
            BUZEI  LIKE BSEG-BUZEI,
            GJAHR  LIKE BSEG-GJAHR,
           END OF ZT_TAB.
           I N T E R N A L   T A B L E   D E C L A R A T I O N S         *
    *-----Internal table to store data
    DATA: ITAB1   TYPE STANDARD TABLE OF XT_TAB INITIAL SIZE 0,
          WA_TAB1 TYPE XT_TAB.
    DATA: ITAB2   TYPE STANDARD TABLE OF YT_TAB INITIAL SIZE 0,
          WA_TAB2 TYPE YT_TAB.
    DATA:   ITAB  TYPE STANDARD TABLE OF  ZT_TAB  WITH HEADER LINE,
            WA_ITAB TYPE ZT_TAB,
            ITAB_FINAL2 TYPE STANDARD TABLE OF ZT_TAB.
    DATA: ITAB_TEMP1 TYPE STANDARD TABLE OF ZT_TAB  WITH HEADER LINE.
                    Selection Screen Declarations                        *
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN begin OF LINE.
    SELECTION-SCREEN COMMENT (23) text-003 FOR FIELD P_LIFNR.
    PARAMETERS P_LIFNR LIKE LFA1-LIFNR OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK bk1.
    START-OF-SELECTION.
          PERFORM XTRACT_DATA.
    END-OF-SELECTION.
    *-----Filling the Output table
      PERFORM populate_main_table.
          PERFORM BUILD_FIELDCATALOG.
         PERFORM SORTING.
          PERFORM BUILD_LAYOUT.
          PERFORM BUILD_ALV_GRID_DISPLAY.
         Form  XTRACT_DATA
    FORM XTRACT_DATA .
    *SELECT
          a~LIFNR
          a~NAME1
          a~STCD2
          b~BELNR
          b~BUZEI
          b~GJAHR
    INTO TABLE ITAB
    FROM LFA1 as a INNER JOIN BSEG as b
      ON  aLIFNR = bLIFNR
    WHERE  a~LIFNR = P_LIFNR.
    SELECT LIFNR
           NAME1
           STCD1
           STCD2
           STCD3
           STCD4
      FROM LFA1
      INTO TABLE ITAB1
      WHERE LIFNR = P_LIFNR.
    IF NOT ITAB1[] IS INITIAL.
        SORT ITAB1 BY LIFNR.
        SELECT BELNR
               BUZEI
               LIFNR
               GJAHR
    INTO TABLE ITAB2
          FROM BSEG
    FOR ALL ENTRIES IN ITAB1
    WHERE LIFNR = itab1-lifnr.
    ENDIF.
    ENDFORM.                    " XTRACT_DATA
    *&      Form  POPULATE_MAIN_TABLE
          text
    -->  p1        text
    <--  p2        text
    FORM POPULATE_MAIN_TABLE .
      LOOP AT ITAB1 INTO WA_TAB1.
              ITAB-LIFNR = ITAB1-LIFNR.
              ITAB-NAME1 = ITAB1-NAME1.
              ITAB-STCD2 = ITAB1-STCD2.
      READ TABLE ITAB2 INTO WA_TAB2 WITH KEY LIFNR = WA_TAB1-LIFNR.
              IF sy-subrc = 0.
              ITAB-BELNR = ITAB1-BELNR.
              ITAB-BUZEI = ITAB1-BUZEI.
              ITAB-GJAHR = ITAB1-GJAHR.
              ENDIF.
    ENDLOOP.
    LOOP AT itab1 INTO wa_tab1.
       MOVE:  wa_tab1-lifnr TO itab-lifnr,
              wa_tab1-name1 TO itab-name1,
              wa_tab1-stcd2 TO itab-stcd2.
          Append itab.
      READ TABLE itab2 TRANSPORTING NO FIELDS WITH KEY lifnr = wa_tab1-lifnr.
      IF sy-subrc eq 0.
        MOVE: wa_tab2-lifnr TO itab-lifnr,
              wa_tab2-belnr TO itab-belnr,
              wa_tab2-buzei TO itab-buzei,
              wa_tab2-gjahr TO itab-gjahr.
      Append itab.
    endif.
    endloop.
    *LOOP AT t_agr_tcodes INTO s_agr_tcodes.
    READ TABLE t_tstc
    TRANSPORTING NO FIELDS
    WITH KEY tcode = s_agr_tcodes-tcode.
    IF sy-subrc eq 0.
       MOVE: s_agr_tcodes-tcode TO it_agr_tcodes-tcode,
             s_agr_tcodes-agr_name to it_agr_tcodes-agr_name,
             t_tstc-pgmna to it_agr_pgmna.
    *Append it_agr_tcodes.
    *endif.
    *endloop.
      ENDFORM.                    " POPULATE_MAIN_TABLE
         Form  BUILD_FIELDCATALOG
    FORM BUILD_FIELDCATALOG .
      REFRESH t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 1.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Vendor Number'.
      wa_fcat-seltext_m = 'Vendor Number'.
      wa_fcat-seltext_l = 'Vendor Number'.
      wa_fcat-fieldname = 'LIFNR'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 2.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Vendor Name'.
      wa_fcat-seltext_m = 'Vendor Name'.
      wa_fcat-seltext_l = 'Vendor Name'.
      wa_fcat-fieldname = 'NAME1'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 3.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Vendor TIN Number'.
      wa_fcat-seltext_m = 'Vendor TIN Number'.
      wa_fcat-seltext_l = 'Vendor TIN Number'.
      wa_fcat-fieldname = 'STCD2'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 4.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Document No'.
      wa_fcat-seltext_m = 'Document No'.
      wa_fcat-seltext_l = 'Document No'.
      wa_fcat-fieldname = 'BELNR'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 5.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Item Number'.
      wa_fcat-seltext_m = 'Item Number'.
      wa_fcat-seltext_l = 'Item Number'.
      wa_fcat-fieldname = 'BUZEI'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
      wa_fcat-col_pos = 6.
      wa_fcat-row_pos = 1.
      wa_fcat-seltext_s = 'Fiscal Year'.
      wa_fcat-seltext_m = 'Fiscal Year'.
      wa_fcat-seltext_l = 'Fiscal Year'.
      wa_fcat-fieldname = 'GJAHR'.
      wa_fcat-tabname = 'ITAB'.
      APPEND wa_fcat TO t_fcat.
      CLEAR t_fcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
         Form  BUILD_LAYOUT
    FORM BUILD_LAYOUT .
    GD_LAYOUT-NO_INPUT = 'X'.
    GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    GD_LAYOUT-TOTALS_TEXT = 'TOTALS'.
    ENDFORM.                    " BUILD_LAYOUT
         Form  BUILD_ALV_GRID_DISPLAY
    FORM BUILD_ALV_GRID_DISPLAY .
    gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_top_of_page  = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
                is_layout               = gd_layout
                it_fieldcat             = t_fcat[]
                it_events               = gt_events
                is_print                = gd_prntparams
                it_sort                 = it_sortcat[]
                i_save                  = 'X'
           TABLES
                t_outtab                = ITAB
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    Edited by: Murugesh P on Apr 6, 2009 10:54 AM
    Edited by: Murugesh P on Apr 6, 2009 10:54 AM

  • ALV pop-up via ALV table view

    Hello Folks,
    I have an ALV table view, after selecting any line item in the view i have button "DETAIL" which would pop up another view with the details in ALV view again.
    I have done the below steps but iam unable to get the alv pop-up with details. I would really appreciate if anyone can help me with this.
    My main view <i>V_OVERVIEW</i> is the initial Table view and i have created another View <i>V_POPUP</i> which just has a Viewcontainer. <i>V_OVERVIEW</i> is embeded in window <i>W_MAIN</i> and <i>V_POPUP</i> is embeded in <i>W_POPUP</i>.
    The view V_POPUP has the following code in its MODIFYVIEW method.
    DATA:node_wage TYPE REF TO if_wd_context_node,
           node_detail type ref to if_wd_context_node,
           lt_sltd_elmnts TYPE wdr_context_element_set,
           lr_element TYPE REF TO if_wd_context_element,
           wa_detail TYPE if_v_pop_up=>element_wage_benefit,
           it_detail TYPE if_v_pop_up=>elements_wage_benefit.
      data : lt_ssn type table of ZUT_XFERRED_SSN,
             lt_return type table of bapiret2.
      node_wage = wd_context->get_child_node( 'WAGE_BENEFIT' ).
      lt_sltd_elmnts = node_wage->get_selected_elements( abap_true ).
      lr_element->get_static_attributes(
        IMPORTING static_attributes = wa_detail ).
      CALL FUNCTION 'ZZ_GET_DETAIL'
        EXPORTING
          i_ob_key = objectkey
          i_quarter  = -quarter
        TABLES
          T_DTL  = lt_dtl
          T_RETURN   = lt_return.
      navigate from <CONTEXT> to <TP_RATES> via lead selection
      node_detail = wd_context->get_child_node( name =
                       ig_componentcontroller=>wdctx_ssn_details ).
      node_detail->bind_elements( new_items = lt_dtl ).
    The main View V_OVERVIEW has the button "DETAIL" which calls the window W_POPUP to show view V_POPUP embeded in it as a popup, here is the code in the Button handler
    DATA:
        l_api_main TYPE REF TO if_wd_view_controller,
        l_window_manager TYPE REF TO if_wd_window_manager,
        l_popup TYPE REF TO if_wd_window,
        l_cmp_api TYPE REF TO if_wd_component.
    * Pop to confirm
      CLEAR : l_api_main, l_cmp_api,
              l_window_manager, l_popup.
      l_api_main = wd_this->wd_get_api( ).
      l_cmp_api = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      l_popup = l_window_manager->CREATE_WINDOW(
      WINDOW_NAME = 'W_POP_UP'
      TITLE = 'Details' ).
      l_popup->open( ).

    hey folks nevermind i got it.
    Thanks

  • SAP Note 1486147 - TDS line item details not flowing in Form 16 A Samrtform

    1.     Old Form 16 certificate is printed before 01.04.2010 and new certificate after 01.04.2010. (its correct SAP has written code in such a manner Old one is SAP script and new on is Smartform.)
    Old FORM 16 A gets Acknowledgement No details correctly.
    2.     Acknowledgment No details are not flowing in the NEW Smart Form of Form 16 A.
    When I debug the program I can see PARTNER No details are copied in PAN NO field in TABLE : IT_LFA11[]
    BUT PARTNER NO details are copied to PARTNERNO field  in TABLE IT_LAFA1[].
    TDS line item details on Smart Form is printed based on Partner no. here partner no. is blank as IT_LFA11 table is passed to smartform..
    Program name : J_1IEWT_CERT
    Include name : J_1IEWT_CERT_F01.
    Code:
    FORM CALL_FORM .
      DATA: h_formname TYPE tdsfname,
              h_fmname TYPE rs38l_fnam,
              h_output_info  TYPE  ssfcrescl,
              h_spoolids TYPE LINE OF ssfcrescl-spoolids,
              h_output_options TYPE ssfcompop,
               spoolno(10) TYPE c.
      DATA : it_lfa11 TYPE STANDARD TABLE OF J_1I_LFA1 INITIAL SIZE 0,
             it_printtab TYPE STANDARD TABLE OF J_1I_PRINTTAB INITIAL SIZE 0,
             it_deduc TYPE STANDARD TABLE OF J_1I_DEDUCTEE INITIAL SIZE 0,
             it_qrtrtab TYPE STANDARD TABLE OF J_1I_QRTRTAB INITIAL SIZE 0,
             it_challan TYPE STANDARD TABLE OF J_1I_CHALLANDETAB INITIAL SIZE 0.
      SORT challandetab BY j_1iextchdt DESCENDING.
      it_lfa11[] = it_lfa1[].
      it_printtab[] = printtab[].
      it_deduc[] = it_deductor[].
      it_qrtrtab[] = qrtrtab[].
      it_challan[] = challandetab[].
      h_output_options-tdnewid    = 'X'.
      h_formname = layout.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = h_formname
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
       IMPORTING
         fm_name                  = h_fmname
    * EXCEPTIONS
    *   NO_FORM                  = 1
    *   NO_FUNCTION_MODULE       = 2
    *   OTHERS                   = 3
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION h_fmname
    EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
       OUTPUT_OPTIONS             = h_output_options
    *   USER_SETTINGS              = 'X'
    IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
       job_output_info            =  h_output_info
    *   JOB_OUTPUT_OPTIONS         =
        TABLES
          it_lfa1                    =   it_lfa11
          it_printtab                = it_printtab
          it_deductee                = it_deduc
          it_qrtrtab                 = it_qrtrtab
          it_challandetab            = it_challan
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
      IF sy-subrc = 0.                                          "1375614
        CLEAR :spoolno,h_spoolids.
        READ TABLE h_output_info-spoolids INTO h_spoolids INDEX 1.
        IF h_spoolids IS NOT INITIAL.
          spoolno  = h_spoolids.
          CONDENSE :spoolno.
          MESSAGE i155(id_wt) WITH spoolno.
          PERFORM update_cert_tables.
        ENDIF.
      ENDIF.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.     
    Can anyone Please help me to get TDS details on the Smartform.
    Regards,
    DivyaLalwani.
    Edited by: kishan P on Feb 23, 2011 1:28 PM

    Hi,
    Achnowledgement details comes in table it_qrtrtab at run time in the smartform, you can dibug the program j_1iewt_cert and smartforms J_1iewt_cert where at run time you will able to see data avaialability, If values are not available in this internal table then check related notes given by SAP, I have already implemented this note and also faced same issue but my FI consultant has given me the related note and my issue was resolved.
    Please checkout related notes and data population in the dibugger.
    Regards,
    Umang Mehta

  • Displaying default value for a field in ALV table

    Hai all,
         I am having an ALV table in which I want to display Requisition number by default using a value which i generated randomly and it is stored in a variable.
    While displaying ALV table my req number field should display that value by default when ever user is inserting a row( all the coloumns n my alv are editable.
    Is it possible?? 
    Kindly give some suggestions.
    Thanks in Advance,
    Nalla.B

    Hai Kris,
        I took help from ur link and i declared a global attribute request_number.
    and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
    FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
      DATA bill_details TYPE REF TO zdom_bill_detail.
      LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
        bill_details ?= <wa_row>-r_value.
        IF bill_details->REQ_NUMBER IS INITIAL.
      DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
      DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
      DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
    navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
      lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
    lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
          lo_el_bill_detail->set_attribute(
            EXPORTING
              name  = 'REQ_NUMBER'
              value = wd_comp_controller->request_number
    Wen am  setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
    lo_el_bill_detail->set_attribute(
        name =  `REQ_NUMBER`
        value = wd_comp_controller->request_number ).
    Pls give some suggestions,
    Thanks in Advance,
    Nalla.B

  • Rectifications of different sizes for all the three table lines in footer.

    Hi friendz,
                    i am working in ecc6 system(smartforms).
                    i am using 3 table lines in the footer one for total, the second one for tax calculation, and the third one for the grand total.
    But in the output screen display - the total, tax and grand total(in different table lines) are displayed with different heights, which gives unprofessional look for the form.
    i want all the table lines in the footer to display with equal heights.

    Hi,
    first you create LTYPE follow below sequence
    Go table tab--> details tab--->give suitable heights for ltype
    next go to FOOTER in the main window
    create three table lines under footer like
    FOOTER1
    FOOTER2
    FOOTER3
    for three table lines we need to assign line type LTYPE
    Go FOOTER1 ---> output options -
    > give LTYPE.
         FOOTER2 ---> output options -
    > give LTYPE.
         FOOTER3 ---> output options -
    > give LTYPE.
    reward points if helpful.
    Regards,
    Bhupal.
    Edited by: bhupal reddy on Jul 22, 2008 11:55 AM

  • WD4A Dynamic ALV Table with dynamic tables

    Hi all,
    first I want give you the information what I try to do.
    I have an another WD4A application for administrative use in which I can assign certain tablefields to a certain user. You can say it's something like a customizing application.
    In the next application (with my issues) I will display the tables for the user, but these tables are not the complete table.
    I have a node in my context of the component controller which is bound to my ALV. I add during the runtime attributes to my node.
    * .... coding ....declaration
    * get the node
      lr_node = wd_context->get_child_node( 'M_TABLE' ).
      lr_node_info ?= lr_node->get_node_info( ).
    * remove the attributes, if exists
      lr_node_info->remove_dynamic_attributes( ).
    * .... coding ....
    *   add attributes
        LOOP AT l_t_m_table INTO l_s_m_table.
          CLEAR ls_attribute.
    *     name of the attribute
          MOVE l_s_m_table-NAME TO ls_attribute-NAME.
    *     DDIC type of the attribute
          MOVE l_s_m_table-TYPE_NAME TO ls_attribute-TYPE_NAME.
    *     If the DDIC has a gen namespace like /B135/ replace the / with _
          REPLACE ALL OCCURRENCES OF '/' IN ls_attribute-NAME WITH '_'.
    *     add the attribute
          lr_node_info->add_attribute( EXPORTING
                                         attribute_info = ls_attribute ).
        ENDLOOP.
    This coding works fine I get the columns in my ALV. Then I tried to fill my ALV table with data from a database table.
    I created dynamicly an internal table with the following coding:
    *   Create dynamic table
        CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
          EXPORTING
            IT_FIELDCATALOG = l_t_FLDCAT
          IMPORTING
            EP_TABLE = l_t_NEW_M_TABLE.
    *   assign the table
        ASSIGN l_t_NEW_M_TABLE->* TO <M_TABLE>.
    *   structure of table
        CREATE DATA l_s_NEW_M_TABLE LIKE LINE OF <M_TABLE>.
        ASSIGN l_s_NEW_M_TABLE->* TO <l_s_m_table>.
    * get data from database
    SELECT * FROM (l_m_table) INTO CORRESPONDING FIELDS OF TABLE <M_table> WHERE OBJVERS = 'A'.
    With this coding I get the data from the database and only the required fields that means I have e.g. an itab with columns1, columns3, columns4 from the database.
    I also added e.g. these columns  (columns1, columns3, columns4 from the database) to the node as attribute. Now it should be possible to bind the table to the structure with this coding:
    lr_comp_usage_m = wd_this->wd_cpuse_usage_alv_M_table( ).
    *   create component if not active
        IF lr_comp_usage_m->has_active_component( ) IS INITIAL.
          lr_comp_usage_m->create_component( ).
        else.
    * set data if node exists
          l_ref_interfacecontroller = wd_this->wd_cpifc_usage_alv_M_table( ).
          l_ref_interfacecontroller->set_data( lr_node ).
        endif.
    *   bind table
        lr_node->bind_table( <M_TABLE> ).
    Now, I get an error, which is caused by the table binding.
    In ST22 I get:
    Short text
        Line types of an internal table and a work area not compatible.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_WDR_CONTEXT_NODE_VAL=======CP" had to be
         terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        The statement
           "INSERT wa INTO TABLE itab"
        requires the lines of the internal table "TABLE" and the
        work area " wa" to be compatible. Compatibility means
        equivalence in the context of ABAP/4 type checking.
        In this case, the condition is not satisfied because the internal table
        "TABLE" has the line type "u" and the length 28, but the work area " wa"
        has the type "C" and the length 2.
        (If the work area " wa" is the header line of the internal
        table "TABLE", the above inconsistency can arise if an internal
        table t with the line type T1 is passed to a subroutine (FORM or
        FUNCTION) as an actual parameter and the corresponding formal
        parameter p is declared in the subroutine by "TABLES p STRUCTURE T2".
        If then T1 and T2 are incompatible, the header line p
        has the type T2 (specifed by STRUCTURE), but the internal
        table p has the line type T1 (passed from the actual parameter)).
    Source Code Extract
    Line  SourceCde
        1 method if_wd_context_node~get_static_attributes_table .
        2
        3   field-symbols:
        4     <element> like line of me->collection,
        5     <static_attributes> type data,
        6     <table> type index table.
        7
        8 * check whether elements are supllied or not
        9   if me->elements_supplied = abap_false.
       10     me->supply_elements( ).
       11   endif.
       12
       13   clear table.
       14
       15   if me->table_ref is not initial.
       16     assign me->table_ref->* to <table>.
       17     table = <table>.
       18   else.
       19     loop at me->collection assigning <element> from from to to.
       20       assign <element>->static_attributes->* to <static_attributes>.
    error in line 21       insert <static_attributes> into table table.
       22     endloop.
       23   endif.
       24
       25 endmethod.
    Any suggestions? Is it allowed to use bind_table() with a field symbol?
    Another strange thing is that if I try the same with static itab and attributes during runtime it works, but only if the fields of the itab has the same name as the attributes, which means that I can not use itabs with fieldnames like /BI0/S_CUSTOMER and if I can not use them it's difficult to read data from database with SELECT * FROM ... INTO CORRESPONDING FIELDS OF TABLE itab.
    Thanks in advance for your suggestions!
    Best Regards,
    Marcel

    Hi Francois,
    I solve it with the RTTI and the method    
    lr_node_info = lr_node_info->add_new_child_node(
                          name = 'Dynamic_TABLE'
                          IS_MANDATORY = ABAP_false
                          IS_MULTIPLE = ABAP_true
                          STATIC_ELEMENT_RTTI = lr_struct_descr
                          IS_STATIC = ABAP_false
    I don't know why it doesn't work with adding attributes and binding the table after adding the attributes.
    Anyway thanks for your help.
    Best Regards,
    Marcel

  • Report Painter - Totals are different on face of report & line item details

    Hello,
    We have a report designed in report painter. Thye lIbrary table is GLPCT.
    When we run the report system gives e.g. 100 $ on face of report. However when we double click on that line to get a line item details reoprt the value is different. It is either less or more than the amount diaplayed on initial report.
    Please can you suggest what coule be the probable reason for this anamoly.
    Thaks & Regards
    Shreenath

    Hi Sreenath,
    when you double-click on a line you are jumping to another report.
    The report you are jumping to has either been defined as a linked report by you, or it has been copied from an original SAP-report if you started the creation of your report by copying a standard SAP report.
    The sending report tries to pass on all the selections for the cell you double-click to the line-item report. For standard SAP reports it is guaranteed that this should work and the line item report gives the sames results as the report you are calling it from.
    For self-defined reports, this may not always work. I have had problems especially when calling line-item reports from sum-lines of my self-defined report. The reason was that the selections could not be passed on properly.
    Example:
    line 1: selection on account X and profit center A
    line 2: selection on account Y and profit center B
    line 3: sum of line 1 and line 2
    Now, when I double-click on a cell of line 3 and jump to line items, it passes on the selection idependently, i.e.
    accounts: X, Y
    profit center: A, B
    the line item report now gives me all values for all combinations of accounts X and Y and profit centers A and B.
    It does not take into account the combined selections in my original report.

  • List UIBB - Access to cell editor for a certain table line possible

    Hi,
    I am looking for a way to access the cell editor of the last table line as I want to mark it as a special - summary - line.
    I intend a similar approach like in WebDynrpo ABAP when accessing the node info and modifying the "CELL DESIGN" attribute like in the following code (copied from WD Comp WDR_TEST_TABLE, View CELL DESIGN, method FILL_CELL_DESIGNS) :
      data tab type IF_CELL_DESIGN=>Elements_Cell_Designs.
      data line type IF_CELL_DESIGN=>Element_Cell_Designs.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      node_info = node->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
      line-is_expanded = abap_true.
      line-is_leaf     = abap_false.
      line-key         = 'FIRST'.
      loop at attribute_info-value_set into attr_value.
        line-text = sy-tabix.
        concatenate 'Text #' line-text into line-text. "#EC NOTEXT
        line-cell_design = attr_value-value.
        insert line into table tab.
        line-is_leaf = abap_true.
        line-key = attr_value-value.
        line-parent_key = 'FIRST'.
      endloop.
      node->bind_table( tab ).
    I suspect the method IF_FPM_GUIBB_LISTGET_DATA (or IF_FPM_GUIBB_LISTGET_DEFINITION) of my feeder class to be the right access point.
    But unfortunately, I have not yet found out how to change the cell design for specific lines, only for whole columns.
    Can anyone give me a hint here?
    BTW: The "summary" line is not a sum of the lines above, but determined by backend logic, so not ALV-summary line for me.
    Kind Regards

    Hi,
    A short update for all interested:
    My current work around is to always set the lead selection to the summary line. It does in a kind "mark" that line as special as long as I cannot mark it using a different cell design.
    How do I assure this?
    I have implemented the following code in a redefinition of the method ADJUST_SELECTION:
    *- alter selection
      DATA:
       ls_size TYPE rstabix.
      "get index of summary line
      ls_size-tabix = mo_collection->size( ).
      "change only if there are any cash conc. proposals
      IF ls_size-tabix > 0.
        "do FPM selection
        CLEAR: ev_lead_index, et_selection.
        ev_lead_index = ls_size-tabix.
        APPEND ls_size TO et_selection.
        "do BOL selection
        mo_collection->if_bol_bo_col_multi_sel~unmark_all( ).
        mo_collection->if_bol_bo_col_multi_sel~mark( iv_index = ls_size-tabix ).
      ENDIF.
    The general downside is, that no other selection is possible!
    The selection is always reset to the summary line with each roundtrip.
    Waiting for a better solution...
    Kind Regards,
    Robert

  • PO line item details from BAPI_PO_GETDETAIL1 and append to BAPI_PO_CHANGE

    Hi,
    The requirement is to get PO line item details from BAPI_PO_GETDETAIL1 and save it in the internal table and append that internal table into  the BAPI_PO_CHANGE.
    But i am getting dump in this program.
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
            INCLUDE STRUCTURE BAPIMEPOITEM. "Include the structure of Dictionary Reference.
    DATA: END OF po_details.
    DATA: BEGIN OF po_details1.
            INCLUDE STRUCTURE BAPIMEPOITEM. "Include the structure of Dictionary Reference.
    data: END OF po_details1.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details,
    wa_po_details like line of it_po_details.
    data: it_po_details1 like standard table of po_details,
    wa_po_details1 like line of it_po_details1.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln DEFAULT '4500000016'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL1'
      EXPORTING
        PURCHASEORDER = p_ebeln
      TABLES
        POITEM        = it_po_details.
    loop at it_po_details into po_details.
      read table it_po_details into wa_po_details with key PO_item = p_ebeln.
      move-corresponding po_details to po_details1.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          PURCHASEORDER = p_ebeln
        TABLES
          POITEM        = it_po_details.
      append po_details to it_po_details1.
      LOOP AT it_po_details1 INTO wa_po_details1.
        WRITE:/ wa_po_details1-PO_item,
           wa_po_details1-MATERIAL,
           wa_po_details1-SHORT_TEXT,
           wa_po_details1-PLANT.
      ENDLOOP.
    endloop.

    HI,
    1st you check for the following following  authorization objects are checked:                                                                               
    M_BEST_BSA (document type in PO)                                                                               
    M_BEST_EKG (purchasing group in PO)                                                                               
    M_BEST_EKO (purchasing organization in PO)                                                                               
    M_BEST_WRK (plant in PO)          
    and to change the PO below is the eg for changing the short text:-
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
            INCLUDE STRUCTURE bapimepoitem. "Include the structure of Dictionary Reference.
    DATA: END OF po_details.
    DATA: BEGIN OF po_details1.
            INCLUDE STRUCTURE bapimepoitem. "Include the structure of Dictionary Reference.
    DATA: END OF po_details1.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details,
    wa_po_details LIKE LINE OF it_po_details.
    DATA: it_po_details1 LIKE STANDARD TABLE OF po_details,
    wa_po_details1 LIKE LINE OF it_po_details1,
    poheader  LIKE  bapimepoheader,
    return  LIKE STANDARD TABLE OF  bapiret2 WITH HEADER LINE,
    poitemx LIKE STANDARD TABLE OF  bapimepoitemx WITH HEADER LINE.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln DEFAULT '5600010646'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL1'
      EXPORTING
        purchaseorder = p_ebeln
      IMPORTING
        poheader      = poheader
      TABLES
        poitem        = it_po_details.
    LOOP AT it_po_details INTO po_details.
      READ TABLE it_po_details INTO wa_po_details INDEX 1.
      MOVE-CORRESPONDING po_details TO po_details1.
      MOVE: po_details-po_item TO poitemx-po_item,
            'X' TO poitemx-short_text.
      APPEND poitemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = p_ebeln
          poheader      = poheader
        TABLES
          return        = return[]
          poitem        = it_po_details[]
          poitemx     =
          poitemx[].
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      APPEND po_details TO it_po_details1.
      LOOP AT it_po_details1 INTO wa_po_details1.
        WRITE:/ wa_po_details1-po_item,
        wa_po_details1-material,
        wa_po_details1-short_text,
        wa_po_details1-plant.
      ENDLOOP.
    ENDLOOP.

  • Create a report same as KSB1 and add WBS line item details in the output

    Hello Everyone,
    I need to create a report exactly like KSB1 which should have a selection screen exactly like KSB1 but it should also display the WBS line item details from CJI3.
    What is the right way of doing it? Please advice.
    COEP is pretty huge in Production, and we need to fetch data by a specific date in selection screen or a cost center group. This can take a long time to fetch data from the table based on selection screen input. Are there function modules or do we need to use some other tables to fetch data same as COEP?
    Thanks for all your help.
    Regards,
    Shipra.
    Moderator message - Cross post locked
    Edited by: Rob Burbank on May 28, 2009 10:54 AM

    Hai ,
             Please go throuth the note  325546  , u need to implement the customer exit  COOMEP01 .
    regards,
    K.Vinay kumar

  • Prevent user from view line item details in KSB1 report

    Hi,
    how to restricting user from view line item details by double-click on it or highlight an item click on Document?
    Regards,
    Kelvin

    Hi,
    This issue got resolved.
    SAP suggested to execute the program "FAGL_CORR_0001" for company code wise.
    In ECC 5.00 from support pack 10 onwards two new fields has been added to table FAGLFLEXA.  (earlier we are on support pack 9, recently we applied the latest support pack)
    If we can execute the above program FAGL_CORR_0001, the two new fields will filled with relevant data and then we can able to use drill down option.
    This is for your information.
    Message was edited by:
            prasad naga

Maybe you are looking for

  • How can i take out the print out of invoices

    i want to see the print preview of billing document and i want to take the  print out also but i m unable to do this so wat is the navigation to do this please suggest. regards subrat

  • OEM grid control installation

    hi i am trying to install the OEM grid control on my machine configured with statis IP address After installation when configuration assistants start to configure. i face the following error continuously. java security configuration assistan fails wi

  • View PDF and Word file

    Post Author: vcharles CA Forum: Crystal Reports Hello, I am using crystal report XI with ACCESS 2003, I would like to create a field in my ACCESS table to insert the path of the PDF or word files I would like to view when I click on the report. Is th

  • Sharing iCal with/without iCloud

    Trying to figure out the best way to share some calendars with a small group of users, some of us have Lions, thus iCloud, some don't and can't upgrade. Used to be able to do it with moble me. Any suggestions?

  • Aperture 3.5.1. under Maverick hangs

    Aperture 3.5.1. under Maverick hangs on my MacPro (early 2008). When I go to import Aperture hangs if there is no picture in the selected folder. What i did so long: - deleting all Plists - deleting the library - deleting PRAM - also when i start up