Help on ALV with multiple header/item output

Dear all:
Below is the actual working code on a multiple header/item display. The alv is supposed to output the details differently in each list. But somehow it only display the last i_tab I gave in all the list(they all look the same). Please help me out here how I can change my code to work properly. Thanks...
*& Report  ZTEST2
REPORT  ZTEST2.
type-pools: slis.
data : NUM1 type I,
       NUM type I,
       begin of str,
       client like mara-mandt,
       mat like mara-matnr,
       end of str,
       tab like standard table of str.
data :wa2 type slis_alv_event ,
      tab2 like standard table of wa2,
      wa1 type   slis_layout_alv,
      wa type line of slis_t_fieldcat_alv,
       tab1 like standard table of wa.
       wa-reptext_ddic = 'Client Num'.
       wa-fieldname = 'CLIENT'.
       wa-tabname = 'TAB'.
       wa-ref_fieldname = 'MANDT'.
       wa-ref_tabname = 'MARA'.
       wa-seltext_l = 'CLIENT'.
       append wa to tab1.
       wa-reptext_ddic = 'Mat Number'.
       wa-fieldname = 'MAT'.
       wa-tabname = 'TAB'.
       wa-ref_fieldname = 'MATNR'.
       wa-ref_tabname = 'MARA'.
       wa-seltext_l = 'MATERIAL'.
       append wa to tab1.
      wa1-no_colhead = 'X'.
       wa2-NAME = SLIS_EV_TOP_OF_PAGE.
       wa2-FORM = 'WRITE_TOP_PAGE'.
       APPEND wa2 TO tab2.
NUM = 0.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
  EXPORTING
    I_CALLBACK_PROGRAM             = sy-cprog.
do 2 times.
NUM1 = NUM1 + 10.
refresh: tab.
select mandt matnr up to NUM1 rows from mara into table tab.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = wa1
    IT_FIELDCAT                      = tab1
    I_TABNAME                        = 'TAB'
    IT_EVENTS                        = tab2
  TABLES
    T_OUTTAB                         = tab.
enddo.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
FORM WRITE_TOP_PAGE.
  NUM = NUM + 1.
  WRITE: / ,
         / 'TABLE NUMBER :', NUM.
ENDFORM.

Hi Jim,
yes for some reason ALV expects you to be using different tables. It seems that it does not save the contents of the tables at each call of 'append' rather it waits until 'display' to deal with the table contents at that time, which in your case is the 20 items.
What you can do is use dynamic tables. check this out:
REPORT  ZNRW_ALV_BLOCK                          .
type-pools: slis.
data : NUM1 type I,
NUM type I.
types:
begin of str,
client like mara-mandt,
mat like mara-matnr,
end of str.
data
tab type standard table of str.
data :wa2 type slis_alv_event ,
tab2 like standard table of wa2,
wa1 type slis_layout_alv,
wa type line of slis_t_fieldcat_alv,
tab1 like standard table of wa.
wa-reptext_ddic = 'Client Num'.
wa-fieldname = 'CLIENT'.
wa-tabname = 'TAB'.
wa-ref_fieldname = 'MANDT'.
wa-ref_tabname = 'MARA'.
wa-seltext_l = 'CLIENT'.
append wa to tab1.
wa-reptext_ddic = 'Mat Number'.
wa-fieldname = 'MAT'.
wa-tabname = 'TAB'.
wa-ref_fieldname = 'MATNR'.
wa-ref_tabname = 'MARA'.
wa-seltext_l = 'MATERIAL'.
append wa to tab1.
wa1-no_colhead = 'X'.
wa2-NAME = SLIS_EV_TOP_OF_PAGE.
wa2-FORM = 'WRITE_TOP_PAGE'.
APPEND wa2 TO tab2.
NUM = 0.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = sy-cprog.
DATA tabDREF TYPE REF TO DATA.
FIELD-SYMBOLS <tab> TYPE table.
do 2 times.
CREATE DATA tabdref TYPE table of str.
ASSIGN tabDREF->* TO <tab>.
NUM1 = NUM1 + 10.
refresh: tab.
select mandt matnr up to NUM1 rows from mara into table <tab>.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = wa1
IT_FIELDCAT = tab1
I_TABNAME = 'TAB'
IT_EVENTS = tab2
TABLES
T_OUTTAB = <tab>.
enddo.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
FORM WRITE_TOP_PAGE.
NUM = NUM + 1.
WRITE: / ,
/ 'TABLE NUMBER :', NUM.
ENDFORM.

Similar Messages

  • ALV with multiple header & dynamic columns

    Hello All,
    I have a requirement where in I need to print multiple header in alv.
    For eg.
    User Name : <Name_1>
    Channel     : <Channel_1>
    Sale Org    : <Sales Org_1>
    Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8
    User Name : <Name_2>
    Channel     : <Channel_2>
    Sale Org    : <Sales Org_2>
    Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8
    no of columns (Col1 , col2 )  are dynamic  . Which would be the best alv type do I need do use?  Is it possible using simple alv grid display. How to handle dynamic column.
    Thnx.

    it is not possible with normal grid or list.
    I guess it is possible by using ALV Block list
    Modified below program to get mutiple header
    REPORT z_alv_block_list.
    Type-pools
    TYPE-POOLS: slis.
    Data declarations.
    DATA: BEGIN OF t_vbak OCCURS 0,
            vbeln TYPE vbeln,
            bstnk TYPE vbak-bstnk,
            erdat TYPE vbak-erdat,
            kunnr TYPE vbak-kunnr,
          END OF t_vbak.
    DATA: BEGIN OF t_vbap OCCURS 0,
            vbeln  TYPE vbeln,
            matnr  TYPE vbap-matnr,
            netpr  TYPE vbap-netpr,
            waerk  TYPE vbap-waerk,
            kwmeng TYPE vbap-kwmeng,
            meins  TYPE vbap-meins,
          END OF t_vbap.
    DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
    DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
    DATA: v_repid         TYPE syrepid.
    DATA: s_layout        TYPE slis_layout_alv.
    DATA: v_tabname       TYPE slis_tabname.
    DATA: t_events        TYPE slis_t_event.
    start-of-selection event.
    START-OF-SELECTION.
      v_repid = sy-repid.
    Get the fieldcatalog for the first block
      PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.
    Get the fieldcatalog for the second block
      PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.
    Get the data for the first block
      SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
             INTO TABLE t_vbak
             FROM vbak WHERE vbeln > '0060000100'.
    Get the data for the second block
      SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10
    ROWS
             INTO TABLE t_vbap
             FROM vbap WHERE vbeln > '0060000100'.
    init
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
           EXPORTING
                i_callback_program = v_repid.
    First block
      v_tabname = 'ITAB1'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout   = s_layout
                it_fieldcat = t_fieldcatalog1
                i_tabname   = v_tabname
                it_events   = t_events
           TABLES
                t_outtab    = t_vbak.
    Second block
      v_tabname = 'ITAB2'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout   = s_layout
                it_fieldcat = t_fieldcatalog2
                i_tabname   = v_tabname
                it_events   = t_events
           TABLES
                t_outtab    = t_vbap.
    *Display
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
          FORM GET_FIELDCAT1                           
          Get the field catalog for the first block    
    FORM get_fieldcat1 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
      DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
      s_fieldcatalog-col_pos       = '1'.
      s_fieldcatalog-fieldname     = 'VBELN'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'VBELN'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Customer purchase order.
      s_fieldcatalog-col_pos       = '2'.
      s_fieldcatalog-fieldname     = 'BSTNK'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'BSTNK'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Creation date.
      s_fieldcatalog-col_pos       = '3'.
      s_fieldcatalog-fieldname     = 'ERDAT'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'ERDAT'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Customer
      s_fieldcatalog-col_pos       = '4'.
      s_fieldcatalog-fieldname     = 'KUNNR'.
      s_fieldcatalog-tabname       = 'T_VBAK'.
      s_fieldcatalog-ref_tabname   = 'VBAK'.
      s_fieldcatalog-ref_fieldname = 'KUNNR'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    ENDFORM.
          FORM GET_FIELDCAT2                           
          Get the field catalog for the second block   
    FORM get_fieldcat2 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
      DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
      s_fieldcatalog-col_pos       = '1'.
      s_fieldcatalog-fieldname     = 'VBELN'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'VBELN'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Material number
      s_fieldcatalog-col_pos       = '2'.
      s_fieldcatalog-fieldname     = 'MATNR'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'MATNR'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Net price
      s_fieldcatalog-col_pos       = '3'.
      s_fieldcatalog-fieldname     = 'NETPR'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'NETPR'.
      s_fieldcatalog-cfieldname    = 'WAERK'.
      s_fieldcatalog-ctabname      = 'T_VBAP'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Currency.
      s_fieldcatalog-col_pos       = '4'.
      s_fieldcatalog-fieldname     = 'WAERK'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'WAERK'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    Quantity
      s_fieldcatalog-col_pos       = '5'.
      s_fieldcatalog-fieldname     = 'KWMENG'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'KWMENG'.
      s_fieldcatalog-qfieldname    = 'MEINS'.
      s_fieldcatalog-qtabname      = 'T_VBAP'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    UOM
      s_fieldcatalog-col_pos       = '6'.
      s_fieldcatalog-fieldname     = 'MEINS'.
      s_fieldcatalog-tabname       = 'T_VBAP'.
      s_fieldcatalog-ref_tabname   = 'VBAP'.
      s_fieldcatalog-ref_fieldname = 'MEINS'.
      APPEND s_fieldcatalog TO lt_fieldcatalog.
      CLEAR s_fieldcatalog.
    ENDFORM.

  • ALV With Multiple Header information

    Hi Friends,
    I have the following requirement.
    Company Header Information 1
    Company Header Information 2
    Company Header Information 3
    Company Header Information 4
    Company Header Information 5
    Operator1 Details1
    Operator1 Details2
         Customer Information A
                 Sales InformationA1
                 Sales InformationA2
                 Sales InformationA3
                 Sales InformationA4
    Operator1 Information2
         Customer Information B
                 Sales InformationB1
                 Sales InformationB2
                 Sales InformationB3
                 Sales InformationB4
    Is this possible through any ALV?
    Thanks & Regards,
    Lijo Joseph

    hi,
    Execute this program nad check if this helps in ur requirement.
    *& Report  ZKEERTHI_ALV3                                               *
    REPORT  ZKEERTHI_ALV3   LINE-COUNT 100                        .
    *& tables declaration
    TABLES: MARA.
    *& type-pools declaration
    TYPE-POOLS: SLIS.
    *& data declaration
    DATA: G_REPID TYPE SY-REPID.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,  "mara
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA : IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,  "makt
           WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
    DATA : IT_FIELDCAT2 TYPE SLIS_T_FIELDCAT_ALV,  "marc
           WA_FIELDCAT2 TYPE SLIS_FIELDCAT_ALV.
    DATA: GT_PRINT TYPE SLIS_PRINT_ALV,
          WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
          XS_EVENT  TYPE SLIS_ALV_EVENT,
          GT_XEVENTS TYPE SLIS_T_EVENT,
          GT_YEVENTS TYPE SLIS_T_EVENT,
          GT_ZEVENTS TYPE SLIS_T_EVENT,
          WA_SORT TYPE SLIS_SORTINFO_ALV,
          IT_SORT TYPE SLIS_T_SORTINFO_ALV.
    DATA: BEGIN OF IT_MARA OCCURS 0,
            MATNR LIKE MARA-MATNR,
            MTART LIKE MARA-MTART,
            MATKL LIKE MARA-MATKL,
            MEINS LIKE MARA-MEINS,
            NTGEW LIKE MARA-NTGEW,
          END OF IT_MARA.
    DATA: BEGIN OF IT_MAKT OCCURS 0,
            MATNR LIKE MAKT-MATNR,
            SPRAS LIKE MAKT-SPRAS,
            MAKTX LIKE MAKT-MAKTX,
            MAKTG LIKE MAKT-MAKTG,
          END OF IT_MAKT.
    DATA: BEGIN OF IT_MARC OCCURS 0,
            MATNR LIKE MARC-MATNR,
            WERKS LIKE MARC-WERKS,
            LADGR LIKE MARC-LADGR,
            MTVFP LIKE MARC-MTVFP,
            DISPR LIKE MARC-DISPR,
            DISMM LIKE MARC-DISMM,
            DISPO LIKE MARC-DISPO,
          END OF IT_MARC.
    *& initialisation
    INITIALIZATION.
    G_REPID = SY-REPID.
    *& selection screen
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR,
                    S_MTART FOR MARA-MTART.
    SELECTION-SCREEN END OF BLOCK B.
    *& start of selection
    START-OF-SELECTION.
    PERFORM GET_MARADETAILS.
    PERFORM GET_MAKTDETAILS.
    PERFORM GET_MARCDETAILS.
    *&      Form  get_maradetails
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MARADETAILS .
    SELECT MATNR
           MTART
           MATKL
           MEINS
           NTGEW FROM MARA
           INTO TABLE IT_MARA
           WHERE MATNR IN S_MATNR AND
                 MTART IN S_MTART.
    ENDFORM.                    " get_maradetails
    *&      Form  get_maktdetails
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MAKTDETAILS .
    SELECT MATNR
           SPRAS
           MAKTX
           MAKTG FROM MAKT INTO TABLE IT_MAKT
           FOR ALL ENTRIES IN IT_MARA
           WHERE MATNR = IT_MARA-MATNR..
    ENDFORM.                    " get_maktdetails
    *&      Form  get_marcdetails
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MARCDETAILS .
    SELECT MATNR
           WERKS
           LADGR
           MTVFP
           DISPR
           DISMM
           DISPO FROM MARC
           INTO TABLE IT_MARC
           FOR ALL ENTRIES IN IT_MARA
           WHERE MATNR = IT_MARA-MATNR.
    ENDFORM.                    " get_marcdetails
    *& end of selection
    END-OF-SELECTION.
    PERFORM SORT_LIST.
    PERFORM MODIFY_FIELDCAT.
    PERFORM EVENT_LIST.
    PERFORM BLOCK_LIST.
    *&      Form  modify_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM MODIFY_FIELDCAT .
    CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-TABNAME = 'IT_MARA'.
      WA_FIELDCAT-SELTEXT_L = 'MATERIAL NUM'.
      WA_FIELDCAT-COL_POS = 1.
      WA_FIELDCAT-OUTPUTLEN = 18.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MTART'.
      WA_FIELDCAT-TABNAME = 'IT_MARA'.
      WA_FIELDCAT-SELTEXT_L = 'MAT TYPE'.
      WA_FIELDCAT-COL_POS = 2.
      WA_FIELDCAT-OUTPUTLEN = 5.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MATKL'.
      WA_FIELDCAT-TABNAME = 'IT_MARA'.
      WA_FIELDCAT-SELTEXT_L = 'MAT GROUP'.
      WA_FIELDCAT-COL_POS = 3.
      WA_FIELDCAT-OUTPUTLEN = 10.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MEINS'.
      WA_FIELDCAT-TABNAME = 'IT_MARA'.
      WA_FIELDCAT-SELTEXT_L = 'UNIT'.
      WA_FIELDCAT-COL_POS = 4.
      WA_FIELDCAT-OUTPUTLEN = 5.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'NTGEW'.
      WA_FIELDCAT-TABNAME = 'IT_MARA'.
      WA_FIELDCAT-DO_SUM = 'X'.
      WA_FIELDCAT-SELTEXT_L = 'QUANTITY'.
      WA_FIELDCAT-COL_POS = 5.
      WA_FIELDCAT-OUTPUTLEN = 15.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'MATNR'.
      WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
      WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUM'.
      WA_FIELDCAT1-COL_POS = 1.
      WA_FIELDCAT1-OUTPUTLEN = 18.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'SPRAS'.
      WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
      WA_FIELDCAT1-SELTEXT_L = 'LANGUAGE'.
      WA_FIELDCAT1-COL_POS = 2.
      WA_FIELDCAT1-OUTPUTLEN = 2.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'MAKTX'.
      WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
      WA_FIELDCAT1-SELTEXT_L = 'MAT DESC'.
      WA_FIELDCAT1-COL_POS = 3.
      WA_FIELDCAT1-OUTPUTLEN = 40.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
      WA_FIELDCAT1-FIELDNAME = 'MAKTG'.
      WA_FIELDCAT1-TABNAME = 'IT_MAKT'.
      WA_FIELDCAT1-SELTEXT_L = 'GRP DESC'.
      WA_FIELDCAT1-COL_POS = 4.
      WA_FIELDCAT1-OUTPUTLEN = 40.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
      CLEAR WA_FIELDCAT1.
    CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'MATNR'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'MATERIAL NUM'.
      WA_FIELDCAT2-COL_POS = 1.
      WA_FIELDCAT2-OUTPUTLEN = 18.
    APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'WERKS'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'PLANT'.
      WA_FIELDCAT2-COL_POS = 2.
      WA_FIELDCAT2-OUTPUTLEN = 4.
      APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'LADGR'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'LOAD GRP'.
      WA_FIELDCAT2-COL_POS = 3.
      WA_FIELDCAT2-OUTPUTLEN = 4.
      APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'MTVFP'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'GRP CHK'.
      WA_FIELDCAT2-COL_POS = 4.
      WA_FIELDCAT2-OUTPUTLEN = 4.
      APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'DISPR'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'MRP PROFILE'.
      WA_FIELDCAT2-COL_POS = 5.
      WA_FIELDCAT2-OUTPUTLEN = 4.
      APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'DISMM'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'MRP TYPE'.
      WA_FIELDCAT2-COL_POS = 6.
      WA_FIELDCAT2-OUTPUTLEN = 4.
      APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
      WA_FIELDCAT2-FIELDNAME = 'DISPO'.
      WA_FIELDCAT2-TABNAME = 'IT_MARC'.
      WA_FIELDCAT2-SELTEXT_L = 'MRP CON'.
      WA_FIELDCAT2-COL_POS = 7.
      WA_FIELDCAT2-OUTPUTLEN = 4.
    APPEND WA_FIELDCAT2 TO IT_FIELDCAT2.
      CLEAR WA_FIELDCAT2.
    ENDFORM.                    " modify_fieldcat
    *&      Form  BLOCK_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM BLOCK_LIST .
    CLEAR WA_LAYOUT.
    WA_LAYOUT-ZEBRA = 'X'.
    WA_LAYOUT-TOTALS_TEXT = 'TOTAL'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        I_CALLBACK_PROGRAM             = G_REPID
       I_CALLBACK_PF_STATUS_SET       = ' '
       I_CALLBACK_USER_COMMAND        = 'user_command'.
      IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = WA_LAYOUT
        IT_FIELDCAT                      = IT_FIELDCAT[]
        I_TABNAME                        = 'IT_MARA'
        IT_EVENTS                        = GT_XEVENTS
       IT_SORT                          = IT_SORT
      I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MARA
    EXCEPTIONS
      PROGRAM_ERROR                    = 1
      MAXIMUM_OF_APPENDS_REACHED       = 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 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = WA_LAYOUT
        IT_FIELDCAT                      = IT_FIELDCAT1
        I_TABNAME                        = 'IT_MAKT'
        IT_EVENTS                        = GT_YEVENTS
      IT_SORT                          =
      I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MAKT
    EXCEPTIONS
      PROGRAM_ERROR                    = 1
      MAXIMUM_OF_APPENDS_REACHED       = 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 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = WA_LAYOUT
        IT_FIELDCAT                      = IT_FIELDCAT2
        I_TABNAME                        = 'IT_MARC'
        IT_EVENTS                        = GT_ZEVENTS
      IT_SORT                          =
      I_TEXT                           = ' '
      TABLES
        T_OUTTAB                         = IT_MARC
    EXCEPTIONS
      PROGRAM_ERROR                    = 1
      MAXIMUM_OF_APPENDS_REACHED       = 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 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK             = ' '
       IS_PRINT                      = GT_PRINT
      I_SCREEN_START_COLUMN         = 0
      I_SCREEN_START_LINE           = 0
      I_SCREEN_END_COLUMN           = 0
      I_SCREEN_END_LINE             = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER       =
      ES_EXIT_CAUSED_BY_USER        =
    EXCEPTIONS
      PROGRAM_ERROR                 = 1
      OTHERS                        = 2
    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.                    " BLOCK_LIST
    *&      Form  EVENT_LIST
          text
    -->  p1        text
    <--  p2        text
    FORM EVENT_LIST .
    CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'XTOP_OF_PAGE'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
      XS_EVENT-FORM = 'XEND_OF_PAGE'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      XS_EVENT-FORM = 'XTOP_OF_LIST'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
      XS_EVENT-FORM = 'XEND_OF_LIST'.
      APPEND XS_EVENT TO GT_XEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
      XS_EVENT-FORM = 'YEND_OF_PAGE'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'YTOP_OF_PAGE'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      XS_EVENT-FORM = 'YTOP_OF_LIST'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
      XS_EVENT-FORM = 'YEND_OF_LIST'.
      APPEND XS_EVENT TO GT_YEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_PAGE.
      XS_EVENT-FORM = 'ZEND_OF_PAGE'.
      APPEND XS_EVENT TO GT_ZEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      XS_EVENT-FORM = 'ZTOP_OF_PAGE'.
      APPEND XS_EVENT TO GT_ZEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      XS_EVENT-FORM = 'ZTOP_OF_LIST'.
      APPEND XS_EVENT TO GT_ZEVENTS.
      CLEAR XS_EVENT.
      XS_EVENT-NAME = SLIS_EV_END_OF_LIST.
      XS_EVENT-FORM = 'ZEND_OF_LIST'.
      APPEND XS_EVENT TO GT_ZEVENTS.
      CLEAR XS_EVENT.
    ENDFORM.                    " EVENT_LIST
    FORM XTOP_OF_PAGE.
    WRITE:/ 'TOP OF PAGE FOR MARA'.
    ENDFORM.
    FORM YTOP_OF_PAGE.
    WRITE:/ 'TOP OF PAGE FOR MAKT'.
    ENDFORM.
    FORM ZTOP_OF_PAGE.
    WRITE:/ 'TOP OF PAGE FOR MARC'.
    ENDFORM.
    FORM XEND_OF_PAGE.
    WRITE:/ 'END OF PAGE FOR MARA'.
    ENDFORM.
    FORM YEND_OF_PAGE.
    WRITE:/ 'END OF PAGE FOR MAKT'.
    ENDFORM.
    FORM ZEND_OF_PAGE.
    WRITE:/ 'END OF PAGE FOR MARC'.
    ENDFORM.
    FORM XTOP_OF_LIST.
    WRITE:/ 'TOP OF LIST FOR MARA'.
    ENDFORM.
    FORM YTOP_OF_LIST.
    WRITE:/ 'TOP OF LIST FOR MAKT'.
    ENDFORM.
    FORM ZTOP_OF_LIST.
    WRITE:/ 'TOP OF LIST FOR MARC'.
    ENDFORM.
    FORM XEND_OF_LIST.
    WRITE:/ 'END OF LIST FOR MARA'.
    ENDFORM.
    FORM YEND_OF_LIST.
    WRITE:/ 'END OF LIST FOR MAKT'.
    ENDFORM.
    FORM ZEND_OF_LIST.
    WRITE:/ 'END OF LIST FOR MARC'.
    ENDFORM.
    *&      Form  sort_list
          text
    -->  p1        text
    <--  p2        text
    FORM SORT_LIST .
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'MTART'.
      WA_SORT-SUBTOT = 'X'.
        APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'MATKL'.
    WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
    ENDFORM.                    " sort_list
    regards,
    keerthi

  • Unable to create PO with multiple line items through LSMW-BAPI method

    Hi All,
    I have a requirement of creating PO through LSMW. I can't use LSMW standard batch input program since there are some fileds not available and also it has many limitations. I'm using LSMW-BAPI method ( Business object BUS2012) which create IDOC and uses BAPI_PO_CREATE1 to ultimately post the PO in the system. I am trying to create PO from a single file which contains both Header and Item data.
    Now my problem is that everytime PO is being created with Single line item only. Everytime I am giving multiple item data in the source file LSMW is preparing multiple IDOCs for multiple line items. As per my understanding this is happenng since header and item is in the same hierarchy level of IDOC type PORDCR102 and the control record is inserted for every line item in the source file.
    It seems that through LSMW-BAPI  it is not possible to create PO with multiple line items. Can anybody provide some input regarding this? Thanks in advance.
    BR,
    Atanu Mukherjee

    Solved by myself.
    Earlier the problem was that LSMW was not being able to recognize items under same header. It was creating new IDOCs every time it gets a new item. To enable this we need to create two structure HEADERDATA and ITEMDATA.  Two additional identifier fields with identifier value 'H' and 'I' should be added in these two structures respectively. Then we need one sequential file with the identifiers field followed by the header and Item data. Example:
    H~header data
    I~item data
    I~item data 
    This would help the standard program to understand what are the items under same header and ultimately create PO with multiple line items.
    BR,
    Atanu Mukherjee

  • Create ecatt script for one sales order creation with multiple line items

    Hi ,
    I want to create a ecatt script for one sales order creation with multiple line items. Preferably SAP GUI.
    This selection of data will be from an external file/ variants which will have only one row of data in it.
    Firstly: I have to sort the external file having same PO Numbers in an order.Group them together.
    Second: I have to create sales order for those many line items having same PO Number.
    Best Regard
    Taranum

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Creating POs with multiple line items

    Hi,
    Is it possible to create a PO with multiple line items from the Sharepoint. The developer guide shows sales order creation with a single line item. If yes, please let me know how it can be done.
    Thanks,
    Pranil

    Hi Pranil,
    You can achieve the user case to create a PO with multiple line items in 1 step by creating a custom solution UI in SharePoint. This is not possible if you simply use the out of box UI (as depicted in the guide).
    It depends on how to define the ESR data type. You can create a data type with header details of PO and collection of items with cardinality as 0..n and create a complex BDC model using SPD --> then create a custom UI.
    Other option would be keep it as 2 lists (2 step action). First create a PO header and then add item by item in 2 steps as foreign key relationship. You can see the example of Account and Activity in pre-shipped contents to get an idea.
    Thanks,
    Girimurugan

  • Where/ how do I set SNP to create Planned orders with multiple line items?

    Hi
    Currently our SNP is generating planned orders on a daily basis, it creates a single order with a single line item per location.
    Where/ how do set SNP to create planned orders on a daily basis to generate a single order with multiple line items per location, so therefore one planned order with multiple line items for a single location.
    Thanx
    Keegan

    Hi Keegan,
                   In SNP (APO) it is not possible to create order with multiple line items.
    But you can do some settings so that while planning system can do aggregation and disaggregation.
    But your requirment should be set on Aggregation/Dis-aggregation logic.
    Please follow the follwing links:
    http://help.sap.com/saphelp_scm2007/helpdata/en/2c/c557e9e330cc46b8e440fb3999ca51/content.htm
    Aggregation:
    http://help.sap.com/saphelp_scm2007/helpdata/en/42/f731d078e73ee4e10000000a1553f6/content.htm
    Disaggregation:
    http://help.sap.com/saphelp_scm2007/helpdata/en/a6/ebefaf32e22e468355da304cc59387/content.htm
    Please be sure that the setting of this logic will be at planning area level.
    You can't change aggregation/disaggregation logic further.
    Regards,
    Santosh

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • How to Restrict Single Delivery Date for PO with Multiple Line Items

    Dear Experts,
    How to Restrict Single Delivery Date for PO with Multiple Line Items.
    System needs to through Error Message if User Inputs Different Delivery Dates for PO with Multiple Line Items in ME21N Tcode.
    Can we achive this by Some Enhancement in SAP or Not ???
    If so how to do it.
    Any Inputs is highly appreciated.
    Thanks and Regards,
    Selvakumar. M

    Hi Selvakumar,
    we can resrict the PO to have a single delivery date in all the line items by means of giving a error message or overwiting the delivery date keyed/determined in the line item.
    You can use the BADI -> ME_PROCESS_PO_CUST. In which you need to implement the method PROCESS_SCHEDULE.
    (for technical aid - This method will be called for each and every PO line item, From the imporing parameter im_schedule we can get all the details of current PO line, even we can change the data in the current PO line. )
    Regards,
    Madhu.

  • Partial goods receipt for PO with multiple line items

    Hello All,
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Regards,
    RJS

    Hi
    While doing MIGO, for a PO with multiple line items, if one line item is having error, will we be able to go ahead with goods receipt? Or entire material document is blocked for doing MIGO?
    No. You cannot post the MIGO, if even one of the PO line item is having problem or giving error.
    We will be doing a development - in case if there is problem in goods receipt (checking of any parameter, and if it is missing - we will be posting error message)...is it possible to ahead with next line item and still post the material document?
    If you skip a line irem and do GR with next line item, how will you match quantity & value with the vendor Invoice at LIV ?
    If partial goods receipt if possible for PO with multiple line items, how do we do it?
    Partial goods receipt is possible for PO line items. That means, if PO has 100 qty for line item 1 then you can do GR for 50 now and 50 later depending on the vendors delivery.
    Hope this is what you mean by "Partial Goods Receipt".
    Edited by: Arun R on May 10, 2010 2:03 PM

  • Want to create 1 reciept with multiple line items under a header in APO

    Hi All,
    I am using BAPI_MOSRVAPS_SAVEMULTI3 to create In-Transit which is the reciept element. But it creates only for a single location/product.
    I have a requirement where I have to create multiple line items under 1 intransit order. Can somebody suggest me how to perform this using a BAPI in APO ??
    Best Regards,
    Chandan Dubey

    Hi Micky
    Firstl you should upload the Line items for a particular sales Order in an Internal table
    and then pass that internal table to your BAPI during your coding corresponding to a particu;lar sales order
    In case of any issues pls revert back
    Reward points if helpful
    Regards
    Hitesh

  • Problem with multiple delivery items status

    Hi Experts,
    Printing of the packing list is trigered when the header packing status is "C" of the Outbound delivery.
    But when the OBD has multiple line items, the status of the header packing status is "C" when
    One line item is compleately packed and packing of other line items is not started.When the second line item
    packing is started (partial packing) the header status changes to "B",this will be "B" till completion of the
    secon line item once the second line item packing is completed again the Header status is changing to "C"
    because of which we are getting multiple printouts of the packing.
    Can anyone help us how to get one print out packing list after packing all line items of the deliver.
    HEADING: mULTIPLE PRINT OUTS FOR PACKING LIST OF THE DELIVERY

    Hi Justin,
    At first, when I would 'Find Devices' under my connected target, I would get a prompt asking to name the FieldPoint item (default being something like [email protected]). This occured for the first three or four seperate cFP-2010's : I would end up with a unique 'FieldPoint' Items folder for each individual target. However in some instances, when I would 'Find Devices', it would immediately bring cursor focus back to a previously linked 'FieldPoint Item', from another/previous cFP-2010.
    I use the verbage 'linked', because when I do a 'Go To Comm Resources Configuration' or 'Go to Items Configuration', it would go to/from DataNeighborhood/Remote Systems.
    How does MAX link the Item Configuration to a Comm Resource? Is it a unique ID within the target?
    V/R,
    Jamie
    v2009 devel. w/RT

  • Scheduling Agreement  with multiple line items of different plants

    Dear Gurus,
    In all plants, delivery of goods is done through multiple plants under one sales order.
    The system is given provision to create centralized sales order with multiple delivery plants but it fails at the time of execution.
    Hence sales order of same customer has to be prepared three times which leads to lack of control at central office.
    scheduling agreement is created and scheduled to deliver through multiple plants. While creating outbound delivery flashes error message as " Delivery split due to different shipping points"
    Please help me out.
    Regards,
    Anbu

    Hi Naveen,
    I guess you would like to change the delivery adress in the BBP_DOC_CHANGE_BADI.
    Here you can identify the delivery adress (partner function 00000027) line item by the field P_GUID. This P_GUID in the partner table (ET_PARTNER-P_GUID) consists the GUID of the SC line item (ET_ITEM-GUID).
    When you know the line item GUID, you can find the SC line item number in the item table (ET_ITEM-NUMBER_INT) and you can see which is the first, second... line item of the SC.
    Regards,
    Peter

  • Certificate of Origin with multiple line items in sapscript - Urgent Please

    Hi Everyone,
    Can you please help me with this issue in SAPSCRIPT.
    This is for billing document with multiple items with each line item with different country of origin.Right now the form is printing only one country of origin even if it has 3 line items each with different country.It's getting first line item's country and printing......but it should diplay each country with comma separated... But in debug it is showing all 3 different countries but in print it is printing only first country of origin.
       I have given text element as &VBDKR-TEXT& in form.
    In ABAP program I am getting country of origin like this,
    CLEAR : V_T005,VBRP , MARC  .
      LOOP AT TVBDPR.
      SELECT SINGLE * FROM VBRP
        WHERE VBELN = VBDKR-VBELN AND POSNR = TVBDPR-POSNR .
    begin of addiiton for ppr 13661
      CLEAR MCH1.
    SELECT SINGLE HERKL FROM MCH1 INTO MCH1-HERKL WHERE MATNR = VBRP-MATNR
                                           AND CHARG = VBdpR-CHARG.
      IF MCH1-HERKL NE ' '.
        CLEAR MARC-HERKL.
        MARC-HERKL = MCH1-HERKL.
      ELSE.
        NAME = VBDKR-VBELN.
          PERFORM HEADER_TEXT1 USING 'VBBK' 'Z065' NAME SY-LANGU.
        IF SY-SUBRC EQ 0.
          READ TABLE TEXT_LINES INDEX 1 .
          IF SY-SUBRC EQ 0.
            VBDKR-TEXT = TEXT_LINES-TDLINE.
          ENDIF.
        ELSE.
          SELECT SINGLE * FROM MARC WHERE MATNR = VBRP-MATNR
                                    AND   WERKS = VBRP-WERKS.
        ENDIF.                                                  "ppr 13661
      ENDIF.                               "PPR 13661 ADD
      CLEAR *T005T.
    data:SEP(3) VALUE ' , '.
    DATA: BEGIN OF ITAB OCCURS 100,
           LANDX LIKE VBDKR-TEXT,
          END OF ITAB.
    clear ITAB.
      SELECT  LANDX FROM T005T INTO table itab WHERE SPRAS = SY-LANGU  AND
    LAND1 = MARC-HERKL.
    LOOP AT itab.
    VBDKR-TEXT = ITAB-LANDX.
    *MOVE VBDKR-TEXT TO ZLAND.
    AT NEW LANDX.
       concatenate ITAB-LANDX sep into VBDKR-TEXT.
    ENDAT.
    modify ITAB.
    VBDKR-TEXT = ITAB-LANDX.
    ENDLOOP.
    endloop.
    Thanks in advance.

    Hi
    It depends on the size of the main in the page, you can set the high of main in order to print max a certain number of rows (so items).
    In this way you don't need the abap control, but the system automatically will print the first page with 15 row and the next with 25

  • Msg SE181 on ML81N/ME21N- PR WITH MULTIPLE SERVICES ITEMS-1 ACC. ASSIGNMENT

    Hi,
    when trying to create a new order using transaction ME21N or creating an entry sheet  on an existing order based on a purchase requisition  with multiple items in the tab services , the system gives the error message SE181 .
    Debugging , i've discovered that the part of code in wich the system gets stuck , is the following :
    PROGRAM  DIMP_GENERAL_SAPLMLSP - INCLUDE LMLSPF3W
    Check if accounting data is in sync with service data "846124
               IF ACC_TOTAL NE COMSRV-NETPR and glob_empty_package NE 'X'.
                  IF SY-TCODE = 'ML81'.
                    MESSAGE I181.
                    EXIT.
                  ELSE.
                    IF GLOB_SUBSCREEN_INIT EQ SPACE.
                      ACT_PACKNO = ESLL-PACKNO.
                      MESSAGE E181.
                    ELSE.
                      perform add_message using comsrv-packno
                                          'E' 'SE' '181' '' '' '
    Someways , it risults that the total of the items value inserted in the tab services , is different from the total NETPR in eban .
    But that is not true . ACC_TOTAL is the variable in which the values of the multiline services is put ; I thought that maybe finding out how it is populated could help me to fix the issue , but I did'nt manage to do that .
    Can somebody help me , please?
    Thanks and Regards,

    Hi,
    I have found a note for this error:
    1102653 SE181 with correct account assignment data
    1159878    ML81N: SE181 is displayed when you delete a entry s
    I have also seen many customers with same error that also applied some of the following notes:
    1113594    BAPI_PO_CHANGE - No rounding in multiple acc -> SE1
    846124     ME21N: Account assignment prompt missing for subite
    800471     ML81: Commitments and reference problems
    784911     ML81N Problems with account assignment
    749021     Service selection with incorrect documents
    716030     ML81N: SE001 when copying a new entry sheet
    709163     ML81N - Multiple Account Assignments - Postings inc
    Best regards,
    Arminda Jack

Maybe you are looking for

  • Adobe Reader Version XI (11.0.06) vs Adobe Acrobat 9 Standard Version 9.5.5

    Do I have to install Adobe Reader Version XI (11.0.06) when I have Adobe Acrobat 9 Standard Version 9.5.5 on my WIN7 Pro, just because Firefox 26.0 needs a newer plugin?

  • Photoshop Save As PDF Settings Text loses 100% Black or Color Density is too High

    I am taking a CMYK Photoshop file and saving it as a PDF for a magazine. By request, the company has asked that the color density does not exceed 260%.  In the output setings of the Save Adobe PDF dialog box, under color, I have: Color Conversion:  C

  • Connecting a PS3 to my IMAC G5

    Anyone knows if it is possible to connect a PS3 to an IMAC? My assumption is that I could connect it if I could find a mini display to HDMI adapter. Any thoughts? Recommendation? Message was edited by: mathg13

  • Roundcube: connection to storage server failed

    I have done a clean install of my server (10.8.2 and 2.2.1) and have reinstalled Rouncube that was working fine on the old server (10.8.2 and 2.1.1). However when I connect to the website I get the error "Connection to storage server failed" I think

  • Problems with package hierarchy

    If i create a simple package hierarchy like this: -trial - trial.subTrial and if i put an abstract class on trial, i cannot extend it on package subTrial (a strange error occur, saying that i'm not overriding the abstract methods, when in fact i am)