RG1 Functionality

Dear Friends,
We have not used the RG1 functionality in the past. Now for the new plant role out we would like to use the RG1 functionality. Is the standard report provided by SAP sufficient. Do we need a custom report to print RG1
Can you help me where to even begin - I need help with
1) What do i have to set up in CIN config  and master data for RG1
2) How do i capture data into the RG1 registry
3) How do i print? - is the existing SAP standard correct and sufficient - any suggestions with a working solution
Thanks
SK

Hi Sunil!
We r working in 4.7.  The setting u r telling is available here also.
In case you have selected the check box 'Update RG1 at MIGO', system shall update RG1 at the time of cration of Outgoing Excise Invoice through MIGO.
If u dont wish for automatic update, please unselect this check box. Please take care of the day/time for doing the same.
Regards
Arun

Similar Messages

  • RG1@ MIGO functionality in Excise group settings in Tax on Goods movement

    Hello
    Can any one tell me the functionality of RG1@ MIGO check box which is in Excise group settings in Tax on goods movement in ECC6.0.
    As per the system it is stating that "Creates an entry in register RG 1 immediately you create an outgoing excise invoice in the standard Goods Movement transaction, MIGO, if the goods in the excise invoice are finished goods."
    I have checked this check box and create the excsie invoice but system is not updating Rg1 automatically.I need to update it through J1I5 only.
    Anybody is having any idea about this functionality?
    Regards
    Sunil

    Hi Sunil!
    We r working in 4.7.  The setting u r telling is available here also.
    In case you have selected the check box 'Update RG1 at MIGO', system shall update RG1 at the time of cration of Outgoing Excise Invoice through MIGO.
    If u dont wish for automatic update, please unselect this check box. Please take care of the day/time for doing the same.
    Regards
    Arun

  • RG1 summary of Finished goods-report.

    Hi Folks,
    RG1 summary of Finished goods-report.
    The closing balance for a particular material number during the month Jan 2007 is showing 1.00 but the opening balance for the same material number during the month February 2007 is showing 0.00 but not 1.00.
    I mean to say the closing balance in January 2007 is not carrying forward into the month Feb 2007.May I know how to go ahead with this problem.
    What is the concept of UPDATE RULES of the table.?
    The previous developer has developed the following report.
    REPORT zxxx MESSAGE-ID z_apd.
    *& Includes *
    INCLUDE <icon>.
    *& Tables *
    TABLES : j_1irg1,
    j_2irg1bal,
    z2irg1bal,
    ser03,
    objk.
    *& Selection Screen *
    SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS : p_exgrp TYPE j_1irg1-exgrp OBLIGATORY,
    p_stdate LIKE sy-datum OBLIGATORY,
    p_endate LIKE sy-datum OBLIGATORY.
    SELECT-OPTIONS s_chapid FOR j_1irg1-chapid .
    SELECTION-SCREEN : END OF BLOCK blk1.
    *& Data Declaration *
    Internal Tables
    DATA : it_display TYPE TABLE OF zj1irg1,
    it_final TYPE TABLE OF zj1irg1,
    it_alv TYPE TABLE OF zj1irg1,
    Work Areas
    wa_display TYPE zj1irg1,
    wa_alv TYPE zj1irg1,
    it_display1 TYPE TABLE OF zj1irg1,
    wa_display1 TYPE zj1irg1,
    wa_alv1 TYPE zj1irg1.
    DATA: BEGIN OF it_itab OCCURS 0.
    INCLUDE STRUCTURE zj1irg1.
    DATA: END OF it_itab.
    DATA : BEGIN OF itab1 OCCURS 0,
    matnr LIKE j_1irg1-matnr,
    END OF itab1.
    DATA : BEGIN OF itab2 OCCURS 0,
    cpudt LIKE j_1irg1-cpudt,
    END OF itab2.
    DATA : BEGIN OF itab3 OCCURS 0.
    INCLUDE STRUCTURE j_1irg1.
    DATA: END OF itab3.
    DATA : itab4 LIKE j_1irg1 OCCURS 0 WITH HEADER LINE,
    itab5 LIKE j_1irg1 OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF itab6 OCCURS 0.
    INCLUDE STRUCTURE j_1irg1.
    DATA : sernr LIKE objk-sernr.
    DATA: END OF itab6.
    DATA : BEGIN OF itab61 OCCURS 0.
    INCLUDE STRUCTURE j_1irg1.
    DATA: sernr LIKE objk-sernr.
    DATA: END OF itab61.
    DATA : itab7 LIKE j_2irg1bal OCCURS 0 WITH HEADER LINE,
    it_bal LIKE j_2irg1bal OCCURS 0 WITH HEADER LINE,
    it_bal1 LIKE j_2irg1bal OCCURS 0 WITH HEADER LINE.
    DATA: qty_menge LIKE j_1irg1-menge,
    iss_menge LIKE j_1irg1-menge,
    tot_menge LIKE j_1irg1-menge,
    op_menge LIKE j_1irg1-menge,
    matnr LIKE j_1irg1-matnr,
    exgrp LIKE j_1irg1-exgrp ,
    cpudt LIKE j_1irg1-cpudt.
    *for checcking lines of itab
    DATA: n1 TYPE i.
    Others
    DATA : v_bwart TYPE mseg-bwart,
    v_index TYPE i,
    v_index1 TYPE i,
    count(4) TYPE n VALUE '0',
    neg TYPE char1 VALUE '-',
    menge TYPE char16,
    count_1 TYPE i,
    count_2 TYPE i,
    count_3 TYPE i,
    count12(4) TYPE n VALUE '0',
    count13(4) TYPE n VALUE '0'.
    *Ranges
    RANGES: v_bwart1 FOR mseg-bwart.
    For ALV Display
    DATA : gs_variant TYPE disvariant,
    gs_layout TYPE lvc_s_layo,
    c_stk TYPE scrfname VALUE 'ZRG1',
    custom_container TYPE REF TO cl_gui_custom_container.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA : grid1 TYPE REF TO cl_gui_alv_grid,
    event_receiver TYPE REF TO lcl_event_receiver,
    ok_code TYPE sy-ucomm,
    it_fieldcatalog TYPE lvc_t_fcat,
    wafieldcatlog TYPE LINE OF lvc_t_fcat,
    lt_rows TYPE lvc_t_row,
    wa_rows TYPE LINE OF lvc_t_row.
    *& Start of Selection *
    START-OF-SELECTION.
    IMPORT s_chapid FROM MEMORY ID 'SCHAPID'.
    PERFORM get_data.
    IF it_display[] IS INITIAL.
    No Details Available
    MESSAGE i017(z_apd) WITH text-005.
    STOP.
    ELSE.
    Display the Details on the Screen
    sort it_display by matnr.
    *sort it_display by cpudt RISINDR RISINDI matnr.
    LOOP AT it_display INTO wa_display.
    ON CHANGE OF wa_display-matnr.
    *insert
    *Check record exits
    SELECT SINGLE * FROM z2irg1bal
    WHERE
    exgrp = exgrp AND
    matnr = matnr AND
    form = 'P' AND
    cb_finish = tot_menge AND
    datum = cpudt.
    *If record does not exists
    *Update balance Table.
    IF count12 GE 1.
    IF sy-subrc NE 0.
    z2irg1bal-mandt = sy-mandt.
    z2irg1bal-exgrp = exgrp.
    z2irg1bal-matnr = matnr.
    z2irg1bal-form = 'P'.
    z2irg1bal-cb_finish = tot_menge.
    z2irg1bal-datum = cpudt.
    INSERT z2irg1bal ."values wa_display.
    COMMIT WORK.
    ENDIF.
    Start of Insertion
    IF sy-subrc EQ 0.
    z2irg1bal-mandt = sy-mandt.
    z2irg1bal-exgrp = exgrp.
    z2irg1bal-matnr = matnr.
    z2irg1bal-form = 'P'.
    z2irg1bal-cb_finish = tot_menge.
    z2irg1bal-datum = cpudt.
    UPDATE z2irg1bal SET cb_finish = z2irg1bal-cb_finish
    WHERE exgrp = z2irg1bal-exgrp AND
    datum = z2irg1bal-datum AND
    matnr = z2irg1bal-matnr AND
    form = 'P'.
    ENDIF.
    End of Insertion.
    ENDIF.
    CLEAR: qty_menge,
    iss_menge,
    tot_menge,
    count,
    matnr,
    cpudt,
    exgrp.
    ENDON.
    loop at itab6.
    AT NEW matnr.
    v_index = 1.
    count = count + 1 .
    ENDAT.
    IF v_index = 1.
    CLEAR v_index.
    *INsert for adding start
    IF wa_display-risind = 'R'.
    *wa_display-OP_FINISH = wa_display-OP_FINISH +
    wa_display-CB_FINISH +
    wa_display-MENGE.
    wa_display-op_finish = wa_display-menge.
    qty_menge = wa_display-op_finish.
    IF wa_display-status = space.
    tot_menge = tot_menge + qty_menge + wa_display-cb_finish .
    ELSE.
    tot_menge = tot_menge - qty_menge + wa_display-cb_finish.
    ENDIF.
    *tot_menge = op_menge.
    op_menge = tot_menge.
    ELSE.
    *Qty Issued
    wa_display-op_bond = wa_display-op_finish - wa_display-menge.
    IF wa_display-op_bond LT 0.
    iss_menge = wa_display-op_bond.
    iss_menge = ABS( iss_menge ).
    *Start of modification
    tot_MENGE = tot_MENGE - iss_MENGE ."
    IF count LE 1.
    tot_menge = wa_display-cb_finish - iss_menge ."
    ELSE.
    tot_menge = tot_menge - iss_menge ."
    ENDIF.
    *End of modification
    op_menge = tot_menge.
    ENDIF.
    ENDIF.
    *wa_display-MENGE_FINI = wa_display-OP_FINISH - wa_display-OP_BOND.
    *tot_MENGE = tot_MENGE + qty_MENGE - iss_MENGE .
    wa_display-menge_fini = tot_menge.
    **matnr for insert
    matnr = wa_display-matnr.
    *excise group
    exgrp = wa_display-exgrp.
    *Date
    cpudt = wa_display-cpudt.
    *Opening Balance
    *Insert start
    *if count le 1.
    if wa_display-RISIND = 'R'.
    wa_display-CB_FINISH = wa_display-CB_FINISH + qty_MENGE.
    else.
    wa_display-CB_FINISH = wa_display-CB_FINISH - iss_MENGE.
    endif.
    *endif.
    *Insert End
    IF count GT 1.
    IF wa_display-risind = 'R'.
    wa_display-cb_finish = tot_menge - qty_menge.
    ELSE.
    wa_display-cb_finish = tot_menge + iss_menge.
    ENDIF.
    ENDIF.
    *check it_display-SERIALNO = wa_display-SERIALNO.
    MODIFY it_display FROM wa_display.
    *INsert for adding end
    *move-corresponding wa_display to it_itab.
    *append it_itab.
    *check it_itab-SERIALNO = wa_display-SERIALNO.
    *if sy-subrc = 0.
    *endif.
    *Insert to update closng to balance to Rg1bal table
    *start
    count12 = count12 + 1.
    *for last record
    AT LAST.
    *Check record exits
    SELECT SINGLE * FROM z2irg1bal
    WHERE
    exgrp = exgrp AND
    matnr = matnr AND
    form = 'P' AND
    cb_finish = tot_menge AND
    datum = cpudt.
    *If record does not exists
    *Update balance Table.
    IF count12 GE 1.
    IF sy-subrc NE 0.
    z2irg1bal-mandt = sy-mandt.
    z2irg1bal-exgrp = exgrp.
    z2irg1bal-matnr = matnr.
    z2irg1bal-form = 'P'.
    z2irg1bal-cb_finish = tot_menge.
    z2irg1bal-datum = cpudt.
    INSERT z2irg1bal ."values wa_display.
    COMMIT WORK.
    Start of Insertion
    IF sy-subrc EQ 0.
    z2irg1bal-mandt = sy-mandt.
    z2irg1bal-exgrp = exgrp.
    z2irg1bal-matnr = matnr.
    z2irg1bal-form = 'P'.
    z2irg1bal-cb_finish = tot_menge.
    z2irg1bal-datum = cpudt.
    UPDATE z2irg1bal SET cb_finish = z2irg1bal-cb_finish
    WHERE exgrp = z2irg1bal-exgrp AND
    datum = z2irg1bal-datum AND
    matnr = z2irg1bal-matnr AND
    form = 'P'.
    ENDIF.
    End of Insertion
    ENDIF.
    ENDIF.
    ENDAT.
    *Insert to update closng to balance to Rg1bal table
    *end
    MOVE-CORRESPONDING wa_display TO wa_alv.
    APPEND wa_alv TO it_alv.
    append itab6 to it_alv.
    ENDIF.
    ENDLOOP.
    loop at it_alv into wa_alv.
    wa_alv-exgrp = wa_alv-exgrp.
    wa_alv-SYEAR = wa_alv-syear.
    wa_alv-SERIALNO = wa_alv-SERIALNO.
    endloop.
    EXPORT it_alv TO MEMORY ID 'ABCD'.
    call screen 100.
    ENDIF.
    *& End of Selection *
    END-OF-SELECTION.
    *& Class Definition *
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar
    FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING e_object e_interactive,
    handle_user_command
    FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm,
    handle_double_click
    FOR EVENT double_click OF cl_gui_alv_grid
    IMPORTING e_row e_column.
    PRIVATE SECTION.
    ENDCLASS. "lcl_event_receiver DEFINITION
    *& Class Implementation *
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Local Variables
    DATA: ls_toolbar TYPE stb_button.
    append a separator to normal toolbar
    CLEAR ls_toolbar.
    MOVE 3 TO ls_toolbar-butn_type.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to to show printing
    CLEAR ls_toolbar.
    MOVE 'PRINT' TO ls_toolbar-function.
    MOVE icon_print TO ls_toolbar-icon.
    MOVE 'Print Receipts' TO ls_toolbar-quickinfo.
    MOVE ' Print' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD. " Handle_toolbar
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'PRINT'.
    REFRESH : lt_rows , it_final.
    CALL METHOD grid1->get_selected_rows
    IMPORTING
    et_index_rows = lt_rows.
    CALL METHOD cl_gui_cfw=>flush.
    LOOP AT lt_rows INTO wa_rows.
    READ TABLE it_alv INDEX wa_rows-index INTO wa_alv.
    LOOP AT it_display INTO wa_display
    WHERE mblnr = wa_alv-mblnr.
    APPEND wa_display TO it_final.
    ENDLOOP.
    ENDLOOP.
    perform display_form.
    ENDCASE.
    ENDMETHOD. "handle_user_command
    METHOD handle_double_click.
    IF e_column = 'MBLNR'.
    READ TABLE it_alv INDEX e_row-index INTO wa_alv.
    IF sy-subrc = 0.
    REFRESH it_final.
    LOOP AT it_display INTO wa_display
    WHERE mblnr = wa_alv-mblnr.
    APPEND wa_display TO it_final.
    ENDLOOP.
    PERFORM call_migo.
    ENDIF.
    ENDIF.
    ENDMETHOD. "handle_double_click
    ENDCLASS. "lcl_event_receiver IMPLEMENTATION
    *& Form get_data
    text
    --> p1 text
    <-- p2 text
    FORM get_data .
    *Select only for matnr and chapid from table
    SELECT matnr FROM j_1irg1
    APPENDING CORRESPONDING FIELDS OF TABLE itab1
    WHERE exgrp = p_exgrp
    AND
    WERKS = P_WERKS
    and
    MATNR in s_MATNR
    and
    CPUDT in s_CPUDT.
    cpudt BETWEEN p_stdate AND p_endate
    AND
    *Chapid
    chapid IN s_chapid
    ORDER BY matnr.
    SORT itab1 BY matnr. " for performance
    DELETE ADJACENT DUPLICATES FROM itab1 COMPARING matnr .
    SELECT cpudt FROM j_1irg1
    APPENDING CORRESPONDING FIELDS OF TABLE itab2
    WHERE exgrp = p_exgrp
    AND
    cpudt BETWEEN p_stdate AND p_endate
    AND
    *Chapid
    chapid IN s_chapid
    ORDER BY cpudt.
    SORT itab2 BY cpudt. " for Performance
    DELETE ADJACENT DUPLICATES FROM itab2 COMPARING cpudt .
    LOOP AT itab1.
    LOOP AT itab2.
    *on change of itab1-matnr or itab2-cpudt.
    *select * from J_1IRG1
    CLEAR itab3.
    SELECT * FROM j_1irg1
    *into itab3
    APPENDING CORRESPONDING FIELDS OF TABLE itab3
    WHERE matnr = itab1-matnr
    AND
    cpudt = itab2-cpudt.
    *count = count + 1.
    IF sy-subrc EQ 0.
    LOOP AT itab3.
    *count = count + 1.
    *READ TABLE itab3 INDEX count."1.
    IF itab3-risind = 'R'.
    MOVE-CORRESPONDING itab3 TO itab4.
    APPEND itab4.
    DELETE itab3.
    MOVE-CORRESPONDING itab4 TO itab6.
    APPEND itab6.
    CLEAR itab4.
    ELSE.
    MOVE-CORRESPONDING itab3 TO itab5.
    APPEND itab5.
    DELETE itab3.
    MOVE-CORRESPONDING itab5 TO itab6.
    APPEND itab6.
    CLEAR itab5.
    ENDIF.
    ENDLOOP.
    ENDIF.
    *endon.
    ENDLOOP.
    ENDLOOP.
    SELECT * FROM z2irg1bal
    APPENDING CORRESPONDING FIELDS OF TABLE itab7
    WHERE exgrp = p_exgrp
    AND
    datum LE p_stdate
    ORDER BY datum.
    SORT itab7 BY datum.
    DELETE ADJACENT DUPLICATES FROM itab7 COMPARING datum .
    *insert Start
    LOOP AT itab6.
    DELETE itab7 WHERE matnr NE itab6-matnr.
    ENDLOOP.
    *insert End
    *insert Start
    LOOP AT itab6.
    CLEAR itab61. REFRESH itab61.
    CLEAR wa_display.
    MOVE-CORRESPONDING itab6 TO wa_display.
    EQPT Serno
    count13 = 1.
    SELECT SINGLE obknr FROM ser03 INTO ser03-obknr WHERE
    mblnr EQ itab6-mblnr
    AND mjahr EQ itab6-mjahr.
    IF sy-subrc EQ 0.
    SELECT sernr FROM objk INTO CORRESPONDING
    FIELDS OF TABLE itab61 WHERE
    obknr EQ ser03-obknr.
    DESCRIBE TABLE itab61 LINES n1.
    *do N1 times.
    LOOP AT itab61.
    IF count13 EQ 1.
    wa_display-sernr = itab61-sernr.
    ENDIF.
    IF count13 EQ 2.
    wa_display-sernr1 = itab61-sernr.
    ENDIF.
    IF count13 EQ 3.
    wa_display-sernr2 = itab61-sernr.
    ENDIF.
    IF count13 EQ 4.
    wa_display-sernr3 = itab61-sernr.
    ENDIF.
    IF count13 EQ 5.
    wa_display-sernr4 = itab61-sernr.
    ENDIF.
    IF count13 EQ 6.
    wa_display-sernr5 = itab61-sernr.
    ENDIF.
    IF count13 EQ 7.
    wa_display-sernr6 = itab61-sernr.
    ENDIF.
    if count13 eq 8.
    objk-SERNR8 = objk-SERNR.
    endif.
    if count13 eq 9.
    objk-SERNR9 = objk-SERNR.
    endif.
    count13 = count13 + 1.
    endselect.
    ENDLOOP.
    *enddo.
    ENDIF.
    endif.
    *End of Modification Eqpt Serial No
    MOVE-CORRESPONDING itab6 TO wa_display.
    SELECT * FROM z2irg1bal
    APPENDING CORRESPONDING FIELDS OF TABLE it_bal1
    WHERE matnr = itab6-matnr
    AND datum LE p_stdate
    AND exgrp = itab6-exgrp.
    SORT it_bal1 DESCENDING .
    READ TABLE it_bal1 INDEX 1.
    ON CHANGE OF itab6-matnr .
    wa_display-cb_finish = it_bal1-cb_finish.
    ENDON.
    AT LAST ."matnr.
    wa_display-cb_finish = it_bal1-cb_finish.
    ENDAT.
    APPEND wa_display TO it_display .
    CLEAR wa_display-cb_finish.
    CLEAR it_bal1. REFRESH it_bal1.
    ENDLOOP.
    SELECT * FROM j_1irg1
    APPENDING CORRESPONDING FIELDS OF TABLE it_itab
    WHERE exgrp = p_exgrp
    AND
    cpudt BETWEEN p_stdate AND p_endate.
    DESCRIBE TABLE it_itab[] LINES count_1.
    count_3 = count_1 + 1.
    DESCRIBE TABLE it_display[] LINES count_2.
    IF it_display IS NOT INITIAL.
    DELETE it_display FROM count_3 TO count_2.
    ENDIF.
    *start of insertion
    DELETE it_display WHERE status = 'C'.
    LOOP AT it_display INTO wa_display.
    CLEAR wa_display-cb_finish.
    MODIFY it_display FROM wa_display.
    ON CHANGE OF wa_display-matnr .
    SELECT * FROM z2irg1bal
    INTO CORRESPONDING FIELDS OF TABLE it_bal1
    WHERE matnr = wa_display-matnr
    AND datum LE p_stdate
    AND exgrp = wa_display-exgrp.
    IF sy-subrc = 0.
    SORT it_bal1 DESCENDING .
    READ TABLE it_bal1 INDEX 1.
    wa_display-cb_finish = it_bal1-cb_finish.
    MODIFY it_display FROM wa_display.
    ENDIF.
    ENDON.
    ENDLOOP.
    *End of insertion
    ENDFORM. " get_data
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'ZRG1'.
    SET TITLEBAR 'ZRG1'.
    DATA: lt_exclude TYPE ui_functions.
    IF custom_container IS INITIAL.
    Create the Custom Container
    CREATE OBJECT custom_container
    EXPORTING
    container_name = c_stk.
    Create an instance of alv control
    CREATE OBJECT grid1
    EXPORTING
    i_parent = custom_container.
    Layout Settings
    gs_layout-sel_mode = 'A'. " Multiple Lines
    MOVE 'RG1 Register' TO gs_layout-grid_title.
    Prepare the Field Catalog
    PERFORM prepare_catalog.
    To Exclude the PRINT Button from the Standard toolbar of ALV
    PERFORM exclude_tb_functions CHANGING lt_exclude.
    Display the List for ALV Display
    CALL METHOD grid1->set_table_for_first_display
    EXPORTING
    it_toolbar_excluding = lt_exclude
    is_layout = gs_layout
    CHANGING
    it_fieldcatalog = it_fieldcatalog[]
    it_outtab = it_alv[].
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_user_command FOR grid1.
    SET HANDLER event_receiver->handle_toolbar FOR grid1.
    SET HANDLER event_receiver->handle_double_click FOR grid1.
    CALL METHOD grid1->set_toolbar_interactive.
    ENDIF.
    CALL METHOD cl_gui_control=>set_focus
    EXPORTING
    control = grid1.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Form exclude_tb_functions
    text
    <--P_LT_EXCLUDE text
    FORM exclude_tb_functions CHANGING pt_exclude TYPE ui_functions.
    Local Varaibles
    DATA ls_exclude TYPE ui_func.
    ls_exclude = cl_gui_alv_grid=>mc_fc_print.
    APPEND ls_exclude TO pt_exclude.
    ENDFORM. " exclude_tb_functions
    *& Form prepare_catalog
    text
    --> p1 text
    <-- p2 text
    FORM prepare_catalog .
    DATA : v_index TYPE i.
    *Entry Date
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'CPUDT'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'RG1 Entry Date'.
    wafieldcatlog-reptext = 'RG1 Entry Date'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Serial No
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERIALNO'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'RG1 serial number'.
    wafieldcatlog-reptext = 'RG1 serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'CHAPID'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Chapter ID'.
    wafieldcatlog-reptext = 'Chapter ID'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'MBLNR'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Number of Material Document'.
    wafieldcatlog-reptext = 'Number of Material Document'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Item
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'ZEILE'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Item in Material Document'.
    wafieldcatlog-reptext = 'Item in Material Document'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'BWART'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Movement Type'.
    wafieldcatlog-reptext = 'Movement Type'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'MENGE'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Quantity'.
    wafieldcatlog-reptext = 'Quantity'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    wafieldcatlog-DO_SUM = 'X'.
    append wafieldcatlog to it_fieldcatalog.
    clear wafieldcatlog-reptext.
    clear wafieldcatlog-key.
    *Base Unit of Measure
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'MEINS'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Base Unit of Measure'.
    wafieldcatlog-reptext = 'Base Unit of Measure'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    wafieldcatlog-do_sum = 'X'.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'RISIND'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Goods Movement Direction'.
    wafieldcatlog-reptext = 'Goods Movement Direction'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Material Number
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'MATNR'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Material Number'.
    wafieldcatlog-reptext = 'Material Number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *CB_FINISH
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'CB_FINISH'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Opening Balance'.
    wafieldcatlog-reptext = 'Opening Balance'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *materail manufactured
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'OP_FINISH'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Qty Manufactured'.
    wafieldcatlog-reptext = 'Qty Manufactured'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Material Issued
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'OP_BOND'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Qty Issue'.
    wafieldcatlog-reptext = 'Qty Issue'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Total
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'MENGE_FINI'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Closing Balance'.
    wafieldcatlog-reptext = 'Closing Balance'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Material Description
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'MAKTX'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Material Description'.
    wafieldcatlog-reptext = 'Material Description'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Storage Location
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'LGORT'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Storage Location'.
    wafieldcatlog-reptext = 'Storage Location'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Goods Movement Direction
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'RISIND'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Goods Movement Direction'.
    wafieldcatlog-reptext = 'Goods Movement Direction'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Reference Document 1
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'RDOC1'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Reference Document 1'.
    wafieldcatlog-reptext = 'Reference Document 1'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Excise Duty Base Amount
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'EXBAS'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Excise Duty Base Amount'.
    wafieldcatlog-reptext = 'Excise Duty Base Amount'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Basic Excise Duty
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'EXBED'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Basic Excise Duty'.
    wafieldcatlog-reptext = 'Basic Excise Duty'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Additional Excise Duty
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'EXAED'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Additional Excise Duty'.
    wafieldcatlog-reptext = 'Additional Excise Duty'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Special Excise Duty
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'EXSED'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Special Excise Duty'.
    wafieldcatlog-reptext = 'Special Excise Duty'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *Cess amount
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'CESS'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Cess amount'.
    wafieldcatlog-reptext = 'Cess amount'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *ECS Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'ECS'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'ECS Value'.
    wafieldcatlog-reptext = 'ECS Value'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    **Register Entry Status
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'STATUS'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Register Entry Status'.
    wafieldcatlog-reptext = 'Register Entry Status'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    append wafieldcatlog to it_fieldcatalog.
    clear wafieldcatlog-reptext.
    clear wafieldcatlog-key.
    *EQPT Serno 1 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *EQPT Serno 2 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR1'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *EQPT Serno 3 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR2'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *EQPT Serno 4 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR3'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *EQPT Serno 5 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR4'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *EQPT Serno 6 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR5'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    *EQPT Serno 7 Value
    v_index = v_index + 1.
    wafieldcatlog-fieldname = 'SERNR6'.
    wafieldcatlog-tabname = 'IT_ALV'.
    wafieldcatlog-seltext = 'Serial number'.
    wafieldcatlog-reptext = 'Serial number'.
    wafieldcatlog-hotspot = ' '.
    wafieldcatlog-col_pos = v_index.
    APPEND wafieldcatlog TO it_fieldcatalog.
    CLEAR wafieldcatlog-reptext.
    CLEAR wafieldcatlog-key.
    ENDFORM. " prepare_catalog
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE user_command_0100 INPUT.
    IF ok_code = 'EXIT'.
    CALL METHOD grid1->free.
    CALL METHOD cl_gui_cfw=>flush.
    leave program .
    LEAVE TO SCREEN 0.
    ENDIF.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form call_migo
    text
    --> p1 text
    <-- p2 text
    FORM call_migo .
    CALL FUNCTION 'MIGO_DIALOG' "n547170
    EXPORTING "n547170
    i_action = 'A04' "n547170
    i_refdoc = 'R02' "n547170
    i_notree = 'X' "n547170
    i_no_auth_check = ' ' "n547170
    i_deadend = 'X' "n547170
    i_skip_first_screen = 'X' "n547170
    i_okcode = 'OK_GO' "n547170
    i_mblnr = wa_alv-mblnr "n547170
    i_mjahr = wa_alv-mjahr . "n547170
    ENDFORM. " call_migo

    T.Code: MB5B
    Regards,
    Rajesh Banka
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).

  • RG1 register opening balance and closing balance updation

    Hi All,
    We are using the RG1 register recently i.e. after the Functional Upgrade (ECC 6.0). While executing J2I6 RG1 Excel report, opening balance and closing balance is not appearing in the report even though we have done the J1I5 extraction.
    Is it mandatory to update the J_2IRG1BAL table with zero stock as and when the new material codes are created.
    Regards,
    Praveen

    HI
    Yes it is mandatory to update the table J_2IRG1BAL with material form and opening stock etc. for all the new materials
    EXGRP: Excise group of the material
    DATUM: Date from which you want RG1 report i.e. 01.01.2004
    MATNR: Material
    FORM:  P for packed, L for loose. note that the same material cannot be maintained as both packed and loose.
    WERKS: Leave it blank
    Maintain all relevant opening balance fields. These fields start with OP
    Note 951955 - CIN: General clarifications for RG1 goods*
    check the above note
    regards
    Prashanth

  • RG1 Report

    Hi All,
    We developed a report to display RG1 report, currently in that we are facing a problem.
    The problem is when we run the report fro the current month its is not displaying the closing balnce done for the material in the previous month. (i.e.) If the report is run for the January month and if not transaction is performed in the December month the report is supose to fetch the last last transaction performed inthe November month.
    The thing is it fetching the value for January month and not the value of November month.
    Below we have pasted the logic used for this issue.
    The Bold sentence is what used for the specific logic.
    *& Report  ZFI_IN01_RG1_REPORT
    REPORT  ZFI_IN01_RG1_REPORT LINE-SIZE 265.
    TYPE-POOLS : SLIS.
    TABLES : ZIN01_RG1BASE, "RG1 Base Table
             MAKT,          " Material Descriptions
             J_1ICHIDTX.    " Chapter id and Text
    TYPES: BEGIN OF TP_RG1BASE,
    MBLNR           LIKE ZIN01_RG1BASE-MBLNR,
    REF_DOC       LIKE ZIN01_RG1BASE-REF_DOC,
    MATNR           LIKE ZIN01_RG1BASE-MATNR,
    ZEILE           LIKE ZIN01_RG1BASE-ZEILE,
    J_1ICHID        LIKE ZIN01_RG1BASE-J_1ICHID,         " CHAPTER ID
    J_1ICHT1        LIKE J_1ICHIDTX-J_1ICHT1,         " CHAPTER ID DESC
    BUDAT           LIKE ZIN01_RG1BASE-BUDAT,
    BWART           LIKE ZIN01_RG1BASE-BWART,
    KZBEW           LIKE ZIN01_RG1BASE-KZBEW,
    CPUTM           like ZIN01_RG1BASE-CPUTM,
    SPLIT_ID        like ZIN01_RG1BASE-SPLIT_ID,
    MENGE           LIKE ZIN01_RG1BASE-MENGE,
    CLOSE_BAL_PRD   LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
    EXPIND          LIKE ZIN01_RG1BASE-EXPIND,
    ZKZBEW          LIKE ZIN01_RG1BASE-ZKZBEW,
    REF_MTYPE       LIKE ZIN01_RG1BASE-REF_MTYPE,
    END OF TP_RG1BASE.
    DATA : IG_RG1BASE TYPE STANDARD TABLE OF TP_RG1BASE WITH HEADER LINE
                                 INITIAL SIZE 100 WITH DEFAULT KEY,
           WG_RG1BASE LIKE LINE OF IG_RG1BASE,
           IG_RG1BASE_COPY LIKE TABLE OF IG_RG1BASE,
           WG_RG1BASE_COPY LIKE LINE OF IG_RG1BASE,
           IG_SUBCONT TYPE STANDARD TABLE OF TP_RG1BASE WITH HEADER LINE
                                 INITIAL SIZE 100 WITH DEFAULT KEY.
          WG_SUBCONT LIKE LINE OF IG_RG1BASE.
    DATA : G_OPEN_BAL LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
           G_CLOSE_BAL  LIKE ZIN01_RG1BASE-CLOSE_BAL_PRD,
           G_FLAG .
    <b>DATA : IG_SORT        TYPE TABLE OF ZIN01_RG1BASE ,
                WG_SORT        TYPE ZIN01_RG1BASE,
                IG_ZIN01_RG1BASE LIKE TABLE OF ZIN01_RG1BASE WITH HEADER LINE.</b>
    Selection Screen
    SELECTION-SCREEN : BEGIN OF BLOCK BLOCK1 WITH FRAME.
    PARAMETERS      : PF_BUDAT LIKE MKPF-BUDAT OBLIGATORY ,                     " FROM DATE
                      PT_BUDAT LIKE MKPF-BUDAT OBLIGATORY.                      " TO DATE
    SELECTION-SCREEN : END OF BLOCK BLOCK1.
    AT Selection Screen
    AT SELECTION-SCREEN.
    SELECT SINGLE * FROM ZIN01_RG1BASE WHERE BUDAT BETWEEN PF_BUDAT AND PT_BUDAT AND CANC_IND <> 'C'.
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZIN01_FI).
    ENDIF.
    START OF SELECTION
    START-OF-SELECTION.
    SELECT MBLNR REF_DOC     MATNR ZEILE A~J_1ICHID J_1ICHT1 BUDAT BWART KZBEW CPUTM
           SPLIT_ID MENGE CLOSE_BAL_PRD EXPIND ZKZBEW REF_MTYPE FROM ZIN01_RG1BASE AS A INNER JOIN J_1ICHIDTX AS B
                                                            ON A~J_1ICHID = B~J_1ICHID
                                                            INTO TABLE IG_RG1BASE
                                                            WHERE BUDAT BETWEEN PF_BUDAT AND PT_BUDAT AND CANC_IND <> 'C'
                                                            AND B~LANGU = SY-LANGU+0(1) AND BWART <> '602'
                                                                                    AND BWART <> '262'
                                                                                    AND BWART <> '202'
                                                                                    AND BWART <> '123'
                                                                                    AND BWART <> '162'
                                                                                    AND BWART <> '102'
                                                                                    AND BWART <> '502'
                                                                                    AND BWART <> '532'.
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZIN01_FI).
    ELSE.
    SELECT  A~MBLNR A~XBLNR B~RDOC1 B~ZEILE B~RITEM1 B~EXBAS B~MENGE INTO TABLE IG_EXCISE FROM MKPF AS A INNER JOIN
                                                      J_1IEXCDTL AS B  ON A~XBLNR = B~RDOC1
                                                      FOR ALL ENTRIES IN IG_RG1BASE
                                                      WHERE  A~MBLNR = IG_RG1BASE-MBLNR  AND B~STATUS <> 'R'.
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZIN01_FI).
    ELSE.
    SELECT VBELN POSNN INTO TABLE IG_VBFA FROM VBFA  FOR ALL ENTRIES IN IG_EXCISE
                                          WHERE VBELV = IG_EXCISE-RDOC1 AND POSNV = IG_EXCISE-RITEM1 AND VBTYP_N = 'M'.
    SORT IG_RG1BASE BY MATNR .
    IG_RG1BASE_COPY[] = IG_RG1BASE[].
    DELETE ADJACENT DUPLICATES FROM IG_RG1BASE_COPY COMPARING MATNR.
    <b>SORT IG_RG1BASE BY MATNR BUDAT CPUTM SPLIT_ID.
    SELECT * FROM ZIN01_RG1BASE INTO IG_ZIN01_RG1BASE.
    IG_SORT[] = IG_ZIN01_RG1BASE[].
    SORT IG_SORT BY MATNR BUDAT  DESCENDING.</b>
    *for 122 AND 161 movement type : if the refdoc is 101 f , subtract 122 menge from 101 menge.
    LOOP AT IG_RG1BASE_COPY INTO WG_RG1BASE_COPY.
    CLEAR G_FLAG.
    LOOP AT IG_RG1BASE INTO WG_RG1BASE WHERE MATNR = WG_RG1BASE_COPY-MATNR.
    <b>IF G_FLAG = ' '.
    PERFORM OPENING_BALANCE.
    WG_MAIN-OPEN_BAL   =  G_OPEN_BAL.
    ELSE.
    WG_MAIN-OPEN_BAL   = G_CLOSE_BAL.
    ENDIF.</b>
    APPEND WG_MAIN TO IG_MAIN.
    CLEAR : WG_MAIN, WG_RG1BASE.
    ENDLOOP.
    CLEAR WG_RG1BASE_COPY.
    ENDLOOP.
    PERFORM OPENING_BAL_CHANGE.
    PERFORM DISPLAY.
    *&      Form  OPENING_BALANCE
          text
    FORM OPENING_BALANCE.
    G_FLAG = ‘F’.
    <b>READ TABLE IG_SORT INTO WG_SORT WITH KEY MATNR = WG_MATERIAL-MATNR.
    IF SY-SUBRC = 0.
    *RECIPT +
    IF WG_RG1BASE-BWART = '101' AND WG_RG1BASE-KZBEW = 'F' OR WG_RG1BASE-BWART = '501' OR WG_RG1BASE-BWART = '561' OR WG_RG1BASE-BWART = '531'.
    G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD  - WG_RG1BASE-MENGE.
    *ISSUES
    ELSEIF WG_RG1BASE-REF_MTYPE = '101' AND WG_RG1BASE-ZKZBEW  = 'F' .
    G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD  + WG_RG1BASE-MENGE.
    ELSEIF  WG_RG1BASE-REF_MTYPE = '501' OR WG_RG1BASE-REF_MTYPE = '561' OR WG_RG1BASE-REF_MTYPE = '531'.
    G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD  + WG_RG1BASE-MENGE.
    ELSE.
    G_OPEN_BAL = WG_SORT-CLOSE_BAL_PRD.
    ENDIF.
    ELSE.
    G_OPEN_BAL = 0.
    ENDIF.</b>
    ENDFORM.
    Suggestions and Help will be much appreciated.
    Regards.
    Ramesh.

    Hi,
    I am having already this report please use this coding.
    REPORT YMS_EXDET MESSAGE-ID E4 NO STANDARD PAGE HEADING LINE-SIZE 350.
    *REPORT  ZMM_EXIN_DOC_ALV_HEADER .
    TABLES : J_1IEXCHDR,      " header table
             J_1IEXCDTL,      " item table
             J_1IPART1,       " Excise part I detials
             J_1IPART2,       " Excise Part II details
             LFA1,            " vendor master table
             J_1IMOVEND,      " vendor excise details table
             MSEG,            " Document Segment: Material
             MKPF,            " Header: Material Document
             DD07T,           " domain text table
             T001W.           " Plant and Branch Details
    DATA : BEGIN OF IT_CHDR OCCURS 100,
           SERIALNO   LIKE J_1IPART1-SERIALNO,
           DOCNO      LIKE J_1IEXCHDR-DOCNO,
           DOCYR      LIKE J_1IEXCHDR-DOCYR,
           EXNUM      LIKE J_1IEXCHDR-EXNUM,
           EXDAT      LIKE J_1IEXCHDR-EXDAT,
           WERKS      LIKE J_1IEXCHDR-WERKS,
           EXBED      LIKE J_1IEXCHDR-EXBED,
           EXCCD      LIKE J_1IEXCHDR-EXCCD,
           ECS        LIKE J_1IEXCHDR-ECS,
           STATUS LIKE J_1IEXCHDR-STATUS, "CHALLAN STATUS
           END OF IT_CHDR.
    DATA : BEGIN OF IT_CDTL OCCURS 100,
           SERIALNO LIKE J_1IPART1-SERIALNO,
           DOCYR  LIKE J_1IEXCDTL-DOCYR,
           DOCNO  LIKE J_1IEXCDTL-DOCNO,
           EXNUM  LIKE J_1IEXCDTL-EXNUM,
           EXDAT  LIKE J_1IEXCDTL-EXDAT,
           LIFNR  LIKE J_1IEXCDTL-LIFNR,
           MATNR  LIKE J_1IEXCDTL-MATNR,
           MAKTX  LIKE J_1IEXCDTL-MAKTX,
           CHAPID LIKE J_1IEXCDTL-CHAPID,
           EXBAS  LIKE J_1IEXCDTL-EXBAS,
           EXBED  LIKE J_1IEXCDTL-EXBED,
           ECS    LIKE J_1IEXCDTL-ECS,
           MENGE  LIKE J_1IEXCDTL-MENGE,
           MEINS  LIKE J_1IEXCDTL-MEINS,
           RDOC2  LIKE J_1IEXCDTL-RDOC2,
           EXGRP  LIKE J_1IEXCDTL-EXGRP,
           RDOC1  LIKE J_1IEXCDTL-RDOC1,
           STATUS LIKE J_1IEXCDTL-STATUS, "CHALLAN STATUS
           END OF IT_CDTL.
    DATA TEXT(10).
    DATA : BEGIN OF IT_OUT OCCURS 0,
           SERIALNO LIKE J_1IPART1-SERIALNO,
           TEXT1    LIKE TEXT,
           EXNUM    LIKE J_1IEXCDTL-EXNUM,
           EXDAT    LIKE J_1IEXCDTL-EXDAT,
           NAME     LIKE LFA1-NAME1,
           DDTEXT   LIKE DD07T-DDTEXT,
           EXCCD    LIKE J_1IEXCHDR-EXCCD,
           BUDAT    LIKE MKPF-BUDAT,
           EXBAS    LIKE IT_CDTL-EXBAS,
           EXBED    LIKE IT_CDTL-EXBED,
           ECS      LIKE IT_CDTL-ECS,
           MATNR    LIKE IT_CDTL-MATNR,
           MAKTX    LIKE IT_CDTL-MAKTX,
           CHAPID   LIKE IT_CDTL-CHAPID,
           MENGE    LIKE IT_CDTL-MENGE,
           MEINS    LIKE IT_CDTL-MEINS,
           DEL_IND(1),
           END OF IT_OUT.
    DATA IT_PART2 LIKE J_1IPART1 OCCURS 0 WITH HEADER LINE.
    DATA S_NO(4) .
    DATA DB_CNT LIKE SY-TABIX.
    DATA EBELN_T LIKE MSEG-EBELN .
    TYPE-POOLS : SLIS.
    DATA : AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA : LIST_HEADER   TYPE SLIS_T_LISTHEADER,
           FIELDCAT      TYPE SLIS_T_FIELDCAT_ALV,
           LS_FTCAT      TYPE LVC_S_FCAT,
           SORTCAT       TYPE SLIS_T_SORTINFO_ALV,
           SORTCAT_LN    LIKE LINE OF SORTCAT,
           G_REPID LIKE SY-REPID,
           G_BACK_GROUND(70),  "like bapibds01-objkey,
           GS_VARIANT LIKE DISVARIANT,
           G_SAVE ,
           GT_EVENTS TYPE SLIS_T_EVENT,
           ALV_EVENT TYPE SLIS_ALV_EVENT,
           EVENTCAT             TYPE SLIS_T_EVENT,
           EVENTCAT_LN          LIKE LINE OF EVENTCAT,
           LAYOUT_IN            TYPE SLIS_LAYOUT_ALV,
           LAYOUT_IN1           TYPE SLIS_LAYOUT_ALV.
    CONSTANTS : GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
    'TOP_OF_PAGE',
                GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE
    'USER_COMMAND',
                GC_FORMNAME_BEFORE_OUTPUT TYPE SLIS_FORMNAME VALUE
    'BEFORE_OUTPUT'.
      ALV_EVENT TYPE SLIS_ALV_EVENT,
    DATA EX_NO LIKE IT_CHDR-EXNUM VALUE 0.
    DATA REGTYP_1 LIKE J_1IPART1-REGTYP.
    SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME.
    PARAMETERS  WERKS TYPE J_1IEXCHDR-WERKS.
    SELECT-OPTIONS : BUDAT FOR J_1IEXCHDR-EXDAT.
    PARAMETERS : R1 RADIOBUTTON GROUP GRP DEFAULT 'X',
                 R2 RADIOBUTTON GROUP GRP.
    SELECTION-SCREEN END OF BLOCK B.
    INITIALIZATION.
      G_REPID = SY-REPID.
      G_SAVE = 'A'.
    PERFORM BUILD_EVENT USING GT_EVENTS[].
      PERFORM ALV_EVENT_INIT.
    AT SELECTION-SCREEN.
      REFRESH LIST_HEADER.
      PERFORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER.
    START-OF-SELECTION.
    PERFORM ALV_EVENT_INIT.
      G_REPID = SY-REPID.
      G_BACK_GROUND = ' ' .
      IF R1 = 'X'.
        CLEAR R2. CLEAR : REGTYP_1.
        REGTYP_1 = 'A'.
         set titlebar 'BALAJI' with DB_CNT.
      ELSEIF R2 = 'X'.
        CLEAR R1.CLEAR : REGTYP_1.
        REGTYP_1 = 'C'.
         set titlebar 'BALAJI1' with DB_CNT.
      ENDIF.
    SELECT * FROM J_1IPART1
                      INTO CORRESPONDING FIELDS OF TABLE IT_PART2
                      WHERE REGTYP = REGTYP_1 AND
                            TRNTYP = 'GRPO'.
                            AND BUDAT IN BUDAT.
                              DOCYR = IT_CDTL-DOCYR AND
                              DOCNO = IT_CDTL-DOCNO.
    LOOP AT IT_PART2.
       SELECT SINGLE * FROM J_1IEXCHDR
                 INTO CORRESPONDING FIELDS OF IT_CHDR
                         WHERE  TRNTYP = 'GRPO' AND
                          STATUS NE ' ' AND
                         STATUS EQ ' ' AND
                         DOCYR = IT_PART2-DOCYR AND
                         DOCNO = IT_PART2-DOCNO AND
                         WERKS = WERKS AND
                         EXDAT IN BUDAT.
                       ORDER BY EXDAT.
       IF SY-SUBRC = 0.
         APPEND IT_CHDR.
       ELSE.
         CONTINUE.
       ENDIF.
    IF SY-SUBRC <> 0.
       MESSAGE E084.
    ENDIF.
    ENDLOOP.
    *******************SPD****************
    SELECT * INTO CORRESPONDING FIELDS OF IT_CDTL FROM J_1IEXCDTL WHERE
                                   TRNTYP = 'GRPO' AND WERKS = WERKS AND
                                    EXDAT IN BUDAT AND STATUS NE 'B'.
    SELECT SINGLE * FROM J_1IPART1 WHERE DOCNO = IT_CDTL-DOCNO AND
                                         DOCYR = IT_CDTL-DOCYR AND
                                         REGTYP = REGTYP_1.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM J_1IPART2 WHERE DOCNO = IT_CDTL-DOCNO AND
                                             DOCYR = IT_CDTL-DOCYR.
      IF SY-SUBRC NE 0.
        IT_CDTL-SERIALNO = J_1IPART1-SERIALNO.
        APPEND IT_CDTL.
      ENDIF.
    ENDIF.
    ENDSELECT.
    ***************SPD********************
    SELECT BDOCNO BDOCYR BEXNUM BEXDAT BWERKS BEXBED B~EXCCD
           B~ECS
           B~STATUS
           A~SERIALNO
           FROM J_1IPART1 AS A INNER JOIN J_1IEXCHDR AS B
           ON ADOCYR = BDOCYR AND ADOCNO = BDOCNO INTO CORRESPONDING
           FIELDS OF TABLE IT_CHDR WHERE B~TRNTYP = 'GRPO' AND
           BWERKS = WERKS AND BEXDAT IN BUDAT AND
           B~STATUS = ' ' AND
           B~STATUS = 'C' AND
           A~REGTYP = REGTYP_1.
    SORT IT_PART2 BY SERIALNO.
    LOOP AT IT_CHDR.
       SELECT * FROM J_1IEXCDTL
                 INTO CORRESPONDING FIELDS OF IT_CDTL
                FOR ALL ENTRIES IN IT_CHDR
                        WHERE
                         TRNTYP = 'GRPO' AND
                          STATUS EQ ' ' AND
                          STATUS EQ 'C' AND
                         STATUS NE 'P' AND
                         DOCNO  = IT_CHDR-DOCNO AND
                         DOCYR  = IT_CHDR-DOCYR AND
                         EXNUM  = IT_CHDR-EXNUM AND
                         EXDAT  = IT_CHDR-EXDAT AND
                         WERKS  = IT_CHDR-WERKS.
         IF SY-SUBRC = 0.
           APPEND IT_CDTL.
           CLEAR  IT_CDTL.
         ELSE.
           CONTINUE.
         ENDIF.
       ENDSELECT.
    MODIFY IT_CDTL INDEX SY-TABIX.
    CLEAR IT_CDTL.
    ENDLOOP.
    *****spd change**********
    *LOOP AT IT_CDTL.
    *SELECT SINGLE * FROM J_1IPART2 WHERE DOCNO = IT_CDTL-DOCNO AND
                                        DOCYR = IT_CDTL-DOCYR.
    *IF SY-SUBRC = 0.
    DELETE IT_CDTL INDEX SY-TABIX.
    *ENDIF.
    *ENDLOOP.
    **SELECT
    *******spd ****************
    SORT IT_CDTL BY  EXNUM EXDAT.
    DELETE ADJACENT DUPLICATES FROM IT_CDTL COMPARING MATNR EXNUM EXDAT.
      LOOP AT IT_CDTL.
        CLEAR TEXT.
        DB_CNT = DB_CNT + 1.
        READ TABLE IT_CHDR WITH KEY EXNUM = IT_CDTL-EXNUM DOCNO =
    IT_CDTL-DOCNO.
       READ TABLE IT_PART2 WITH KEY DOCNO = IT_CDTL-DOCNO .
       IT_OUT-SERIALNO = IT_PART2-SERIALNO.
        SELECT SINGLE NAME1 FROM LFA1
                        INTO IT_OUT-NAME
                        WHERE LIFNR = IT_CDTL-LIFNR.
        SELECT SINGLE * FROM LFA1
                          WHERE LIFNR = IT_CDTL-LIFNR.
        IF LFA1-LAND1 EQ 'IN'.
          TEXT = 'INVOICE'.
          IT_OUT-TEXT1 = TEXT.
        ELSE.
          TEXT = 'BOE'.
          IT_OUT-TEXT1 = TEXT.
        ENDIF.
        SELECT SINGLE * FROM J_1IMOVEND
                        WHERE LIFNR = IT_CDTL-LIFNR.
        SELECT SINGLE * FROM DD07T
                       INTO IT_OUT-DDTEXT
                        WHERE DOMNAME = 'J_1IVTYP' AND
                              DDLANGUAGE = 'EN' AND
                              DOMVALUE_L = J_1IMOVEND-J_1IVTYP.
      IF DD07T-DDTEXT = 'First Stage Dealer of indigenous excisable goods'
    OR
        DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisablegoods'.
          DD07T-DDTEXT = 'Dealer'.
        ENDIF.
        IT_OUT-DDTEXT = DD07T-DDTEXT.
       ELSEIF DD07T-DDTEXT = 'Second Stage Dealer of indigenous excisable
    *goods'.
          DD07T-DDTEXT =
        CLEAR EBELN_T.
        SELECT SINGLE LFBNR FROM MSEG
                            INTO EBELN_T
                            WHERE MBLNR = IT_CDTL-RDOC2 .
        SELECT SINGLE * FROM MSEG
                          WHERE BWART EQ '106' AND
                                LFBNR = EBELN_T ."and
                               ebeln = ebeln_t.
        IF SY-SUBRC = 0.
          IT_OUT-DEL_IND = 'X'.
        ELSE.
          IT_OUT-DEL_IND = ' '.
        ENDIF.
        SELECT SINGLE BUDAT FROM MKPF
                          INTO IT_OUT-BUDAT
                          WHERE MBLNR = EBELN_T  ."MSEG-LFBNR.
        IT_OUT-EXNUM = IT_CDTL-EXNUM.
        IT_OUT-EXDAT = IT_CDTL-EXDAT.
        IT_OUT-EXCCD = IT_CHDR-EXCCD.
       IT_OUT-SERIALNO = IT_CHDR-SERIALNO.
        IT_OUT-SERIALNO = IT_CDTL-SERIALNO.
        IT_OUT-EXBAS = IT_CDTL-EXBAS.
        IT_OUT-EXBED = IT_CDTL-EXBED.
        IT_OUT-ECS   = IT_CDTL-ECS.
        IT_OUT-MATNR = IT_CDTL-MATNR.
        IT_OUT-MAKTX = IT_CDTL-MAKTX.
        IT_OUT-CHAPID = IT_CDTL-CHAPID.
        IT_OUT-MENGE = IT_CDTL-MENGE.
        IT_OUT-MEINS = IT_CDTL-MEINS.
        APPEND IT_OUT.
       EX_NO = IT_CDTL-EXNUM.
      ENDLOOP.
    Title Portion
      IF REGTYP_1 = 'A'.
        SET TITLEBAR 'BALAJI' WITH DB_CNT.
      ELSEIF REGTYP_1 = 'C'.
        SET TITLEBAR 'BALAJI1' WITH DB_CNT.
      ENDIF.
      AFIELD-COL_POS = 1.
      AFIELD-FIELDNAME = 'SERIALNO'.
      AFIELD-SELTEXT_L = 'SERIAL NO.'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 2.
      AFIELD-FIELDNAME = 'TEXT1'.
      AFIELD-SELTEXT_L = 'TYPE OF DOC'.
      AFIELD-JUST = 'L'.
      AFIELD-DECIMALS_OUT = '0'.
      AFIELD-NO_ZERO = 'X'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 3.
      AFIELD-FIELDNAME = 'EXNUM'.
      AFIELD-SELTEXT_L = 'DOC.NO'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 4.
      AFIELD-FIELDNAME = 'EXDAT'.
      AFIELD-SELTEXT_L = 'DOC.DATE'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 5.
      AFIELD-FIELDNAME = 'NAME'.
      AFIELD-SELTEXT_L = 'NAME OF THE SUPPLIER'.
      AFIELD-NO_ZERO = 'X'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 6.
      AFIELD-FIELDNAME = 'DDTEXT'.
      AFIELD-SELTEXT_L = 'TYPE-OF-SUPPLIER'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 7.
      AFIELD-FIELDNAME = 'EXCCD'.
      AFIELD-SELTEXT_L = 'ECC OF THE SUPPLIER'.
      AFIELD-NO_ZERO = 'X'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 8.
      AFIELD-FIELDNAME = 'BUDAT'.
      AFIELD-SELTEXT_L = 'INPUT RECV DATE'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 9.
      AFIELD-FIELDNAME = 'EXBAS'.
      AFIELD-SELTEXT_L = 'ASSESSABLE-VALUE'.
      AFIELD-DO_SUM             = 'X'.
      AFIELD-JUST = 'R'.
      AFIELD-DECIMALS_OUT = '2'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 10.
      AFIELD-FIELDNAME = 'EXBED'.
      AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN CENVAT'.
      AFIELD-JUST = 'R'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 11.
      AFIELD-FIELDNAME = 'ECS'.
      AFIELD-SELTEXT_L = 'DET OF CREDIT TAKEN E-CESS'.
      AFIELD-JUST = 'R'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 12.
      AFIELD-FIELDNAME = 'MATNR'.
      AFIELD-SELTEXT_L = 'MATERIAL-CODE'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 13.
      AFIELD-FIELDNAME = 'MAKTX'.
      AFIELD-SELTEXT_L = 'DESCRIPTION'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 14.
      AFIELD-FIELDNAME = 'CHAPID'.
      AFIELD-SELTEXT_L = 'TARIFF-ID'.
      AFIELD-JUST = 'L'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 15.
      AFIELD-FIELDNAME = 'MENGE'.
      AFIELD-SELTEXT_L = 'QUANTITY'.
      AFIELD-JUST = 'R'.
      AFIELD-DO_SUM             = ' '.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 16.
      AFIELD-FIELDNAME = 'MEINS'.
      AFIELD-SELTEXT_L = 'UOM'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
      AFIELD-COL_POS = 17.
      AFIELD-FIELDNAME = 'DEL_IND'.
      AFIELD-SELTEXT_L = 'Deleted'.
      AFIELD-JUST = 'C'.
      APPEND AFIELD TO FIELDCAT.
    AFIELD-COL_POS = 18.
    AFIELD-FIELDNAME = 'PO NO'.
    AFIELD-SELTEXT_L = 'PURDOCNO'.
    AFIELD-JUST = 'C'.
    APPEND AFIELD TO FIELDCAT.
    * LAYOUT FOR ZEBRA CATLOG
      LAYOUT_IN-COLWIDTH_OPTIMIZE = 'X'.
      LAYOUT_IN-ZEBRA             = 'X'.
      LAYOUT_IN-GET_SELINFOS      = 'X'.
      LAYOUT_IN-CONFIRMATION_PROMPT = 'X'.
      LAYOUT_IN-DETAIL_POPUP = 'X' .
    SORTCAT-decimals     = '0'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = G_REPID
          I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
          I_SAVE                  = G_SAVE
          IS_VARIANT              = GS_VARIANT
          IT_FIELDCAT             = FIELDCAT
          IT_SORT                 = SORTCAT
          IS_LAYOUT               = LAYOUT_IN
          IT_EVENTS               = EVENTCAT
         I_BACKGROUND_ID         = g_back_ground
        TABLES
          T_OUTTAB                = IT_OUT.
    *&      Form  TOP_OF_PAGE_LIST_HEADER
          text
         -->LIST_HEADERtext
    FORM TOP_OF_PAGE_LIST_HEADER USING LIST_HEADER TYPE SLIS_T_LISTHEADER.
      DATA : HLINE TYPE SLIS_LISTHEADER,
             TEXT(60) TYPE C.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      SELECT SINGLE * FROM T001W WHERE WERKS = WERKS.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE 'PLANT :' TO TEXT.
      WRITE WERKS TO TEXT+8.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE T001W-NAME1 TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE T001W-STRAS TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE T001W-ORT01 TO TEXT.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
      CLEAR : HLINE,TEXT.
      HLINE-TYP = 'H'.
      WRITE 'DATE :' TO TEXT.
      WRITE BUDAT-LOW TO TEXT+7.
      IF BUDAT-HIGH NE ''.
        WRITE 'TO' TO TEXT+18.
        WRITE BUDAT-HIGH TO TEXT+22.
      ENDIF.
      HLINE-INFO = TEXT.
      APPEND HLINE TO LIST_HEADER.
    ENDFORM.                    "TOP_OF_PAGE_LIST_HEADER
    *&      Form  ALV_EVENT_INIT
          text
    FORM ALV_EVENT_INIT .
      CLEAR ALV_EVENT.
      ALV_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      ALV_EVENT-FORM = 'ALV_TOP_OF_PAGE'.
      APPEND ALV_EVENT TO EVENTCAT.
      CLEAR ALV_EVENT.
      ALV_EVENT-NAME = SLIS_EV_TOP_OF_LIST.
      ALV_EVENT-FORM = 'ALV_TOP_OF_LIST'.
      APPEND ALV_EVENT TO EVENTCAT.
       CLEAR ALV_EVENT.
       ALV_EVENT-NAME = SLIS_EV_END_OF_LIST.
       ALV_EVENT-FORM = 'ALV_END_OF_LIST'.
       APPEND ALV_EVENT TO GT_EVENTS.
       CLEAR ALV_EVENT.
       ALV_EVENT-NAME = SLIS_EV_END_OF_PAGE.
       ALV_EVENT-FORM = 'ALV_END_OF_PAGE'.
       APPEND ALV_EVENT TO GT_EVENTS.
    ENDFORM.                    "ALV_EVENT_INIT
    *&      Form  ALV_TOP_OF_PAGE
          text
    FORM ALV_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = LIST_HEADER
          I_LOGO             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "ALV_TOP_OF_PAGE
    *&      Form  BUILD_EVENT
          text
         -->P_GT_EVENTS[]  text
    FORM BUILD_EVENT USING P_EVENTS TYPE SLIS_T_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = P_EVENTS
        EXCEPTIONS
          LIST_TYPE_WRONG = 1
          OTHERS          = 2.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND INTO
    ALV_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_USER_COMMAND TO ALV_EVENT-FORM.
        APPEND ALV_EVENT TO P_EVENTS.
      ENDIF.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT INTO
    ALV_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_BEFORE_OUTPUT TO ALV_EVENT-FORM.
        APPEND ALV_EVENT TO P_EVENTS.
      ENDIF.
    ENDFORM.                    " BUILD_EVENT
    Thanks,
    Shankar

  • RG1 registry not updating

    Dears
    I have gone through existing forums and  I was very clear about the functionality of the same but
    there is one error which I am facing
    SCENARIO
    I have proceeded with the steps given in SD wiki and also I have gone through oss note 373001 which was quite helpful to certain limit because when I am using t-code J1I5 and entering parameters as mentioned in sd wiki page,system is givig me message,
    "list contains no data" while execution.
    Kindly let me know which parameters I have to enter or check!
    Regards
    KAPIL MORE

    Hi Kapil,
    Please follow the below steps and confirm:
    1) Update the Packed/Unpacked indicator for each material in the table.
    2) Include 561(initial upload movement type) in the CIN configuration.
    3) Update RG1 for initial update Material documents.
    Now the initial stock will be available in RG1, then you can try updating the regular transactions (601 etc.,).
    With Regards,
    Karthik
    Edited by: sapsd_123 on Jul 18, 2011 3:54 PM

  • RG1 updation error

    hi all
    We are implementing ECC 6.0 with CIN functionality
    AT time of RG1 register i am getting error like "NOT ENOUGH BALANCE FOR UTLIZATION"
    Now one can suggest that maintaining PLA balance can solve problem but , what is the link between PLA balance & RG1 register updation
    All other settings are maintained properly
    please let me know

    hi thanks for ur response.
    can u tel me whether we have to maintain any opening balance(initial/physical stock) in table R_2IRG1BAL or not. if yes, where we have to maintain the op bal: in OP_CF or OP_Finish
    Also, is there any other table that we have to maintain for RG1 register updation?
    And, what are the tables other than J_2IEXTRCT, J_1IRG1 and J_1IRGSUM affected wen v do some RG1 transactions.
    Rgds,

  • Regarding RG1 Table J_2irg1bal

    Hi sap experts,
    I am facing the problem when i goto SE16 to open table" J_2I RG1 BAL" to put opening bal of finished product.(RG1 REGISTER UPDATION)
    System is not able to open the table throwing error message
    like" create data processing functional module "
    please give me the guide lines to solve the issue.

    1st go through se11 then display after giving the table name and then goto->utility->table entry->create entry
    you will be able to generate the entry.
    if again it is giving the error then take your basis administrator or technical consultant.

  • Error : J_2IRG1BAL, Create data processing Function module

    Sap Experts,
    when i go to se11 in which have given table name: J_2IRG1BAL, than i gone menu bar click on utilities select the table contents
    click on create entries button.
    1) Error Message : Create data processing function module
    2) This table Relevant to RG1 Updation
    3) Due to this error I am not able to upload the opening stock of finished material manuaaly
    4) What are the actions need to be done to rectify the above error.
    Regards,
    Prabhakar

    Hi
    Ask your ABAPER to create the maintainence view of the table
    regards
    Sanil Bhandari

  • RG1 Register Updated Error

    Dear All,
    I have select Movement Type is 601 and Classification  is IWO and select the RG1 option.
    Next i go select the view list of items and simulate the list. All the items are marked in red color. I do not know.
    Please kindly to give the clear process for RG1 .
    Thanks
    Saro

    Just wanted to know, 1)whether you are using this functionality for the first time or
                                        2)it was updating the RG1 register earlier but it is not updating now.
    If your answer is 1), .......
                                             A) You need to maintain the necessary settings related to movement types relevant for updating RG1 register
                                             B) Check that whether RG1 balance is uploaded RG1 opening balance table
                                             C) You need to update the RG1 inward entries before updating the outward entries
                                             D) Check whether classification IWO is relevant for RG1 updation or not
    If your answer is 2), .......
                                            A) Check the RG1 balance
                                            B) Check all movement types associated with inward entries relevant for RG1 are maintained in customizing
                                           C) Check classification IWO is relevant for RG1
    Let me know if it resolves your issue

  • Fax function of HP LaserJet Enterprise 500 Color MFP M575

    Hi,
    I am one of users of HP LaserJet Enterprise 500 Color MFP M575​.
    I would like to know can I set the printer do not print my fax number and fax header on paper when I fax my document to others.
    I had login as admin but I did not see where I can config it.
    Thank you.
    Regards,
    Jimmy Pun

    There is no change to this problem after 6 months since the last post. Put simply, and as stated in the previous posts, there is no way to scan a document and receive the image on your PC. If you are working with graphics for any length of time or want to create an image for inclusion as an image in a document or web page using this piece of equipment will not allow you to do so.
    Great shame as every other function works well - it cannot be beyond the wit of HP to include a Windows application that enables you to scan an image, receive it in the software you are using at the time (e.g. Outlook, Word, Photoshop...) and use it in your work.
    HP Printers several years older than this £1000+ Enterprise printer were able to do this simple job and have done so for a great many years. Just being able to use Microsoft's Fax and Scan would be start.

  • Logical Operations in SQL decode function ?

    Hi,
    Is it possible to do Logical Operations in SQL decode function
    like
    '>'
    '<'
    '>='
    '<='
    '<>'
    not in
    in
    not null
    is null
    eg...
    select col1 ,order_by,decode ( col1 , > 10 , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 , <> 10 , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 , not in (10,11,12) , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 ,is null , 0 , 1)
    from tab;
    Regards,
    infan
    Edited by: user780731 on Apr 30, 2009 12:07 AM
    Edited by: user780731 on Apr 30, 2009 12:07 AM
    Edited by: user780731 on Apr 30, 2009 12:08 AM
    Edited by: user780731 on Apr 30, 2009 12:08 AM
    Edited by: user780731 on Apr 30, 2009 12:09 AM

    example:
    select col1 ,order_by,case when col1 > 10 then 0 else 1 end
    from tab;
    select col1 ,order_by,case when col1 &lt;&gt; 10 then 0 else 1 end
    from tab;
    select col1 ,order_by,case when col1 not in (10,11,12) then 0 else 1 end
    from tab;As for testing for null, decode handles that by default anyway so you can have decode or case easily..
    select col1 ,order_by,decode (col1, null , 0 , 1)
    from tab;
    select col1 ,order_by,case when col1 is null then 0 else 1 end
    from tab;

  • If statement in CE function

    Hi,
    When we use IF in calculation view with CE function the SQL engine is used.
    When we remove the "IF" the  CE engine is used.
    Is there any alternative for if or case in CE functions?
    Thanks,
    Amir

    Is it possible to use CE_CALC for this functionality?
    We are trying to use it inside projection:
    res_bal = CE_PROJECTION (:bal,[ "BUDAT", "RYEAR" ,  "Bal_Date" AS "BALANCE_DATE",   "RTCUR" ,"MAX_ZGROUP"],'"BALANCE_DATE" == 20140101');
    works but:
    res_bal = CE_PROJECTION (:bal,[ "BUDAT", "RYEAR" ,  "Bal_Date" AS "BALANCE_DATE",   "RTCUR" ,"MAX_ZGROUP"], '"BALANCE_DATE" == CE_CALC( 'if(''20140101'' == ''19000101'', ''19000101'', ''20140101'')');
    Doesn't work.
    Thanks,
    Amir

  • IPhone 5s Voice memo to mp3. Now music on iPhone. Won't play from search function.

    I record my band rehearsals using the voice memo on my iPhone 5s. Then I sync to iTunes and convert file to mp3. When i sync back to my iPhone it appears in my music. So far, so good. When I use the search function in music it finds the file but won't play from tapping. I must troll through all my music songs (currently 2227 of them) to find it and then play it. Is it something to do with it still being under the genre "voice memos" or what ?  Anybody help please.  Thanks

    iWeb is an application to create webpages with.
    It used to be part of the iLife suite of applications.
    iWeb has no knowledge of the internal speaker on your iPhone.
    You may want to ask in the right forum.

  • HP AiO Remote app will not recognize scan and copy function of HP Envy 120

    Good morning! HP AiO Remote App is installed on my iPad4 and in the same WiFi network with my HP Envy 120 printer. The printer is recognized by the app and marked with a green led. When I tap on scan or copy in the app menu, it tells me that these functions were available in the app only for printers which provide these features. But HP Envy 120 has both scanner and copier. And last time it worked. Some idea what could have happened here? Thanks. UJ

    Replied on: http://h30434.www3.hp.com/t5/ePrint-Print-Apps-Mobile-Printing-and-ePrintCenter/HP-AiO-Remote-will-n...
    TwoPointOh
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

Maybe you are looking for

  • Trouble modifying a document

    We are having trouble modifying our XML document that we have successfully stored in our database using DBXML. Correct me if I am wrong, but we understand that in order to modify the document using XmlModify, we must query the document for the specif

  • What of these is even possible?

    If someone wants to be specific on their answers it'd be much appreciated, BUT just yes or no is good too. I want to guide and streamline my research, obviously researching a function you are shooting for in an app can eat up lots of hours. I want so

  • Limit on maxRows for a smartview report

    One of the business unit extensively use SmartView to create Excel report. And they would be rather comfortable using excel for their reporting purpose. I would like to know if there is a best practice for a smartview report. Currently we have increa

  • JTextArea problem

    Why does the following code not print "Test" in the JTextArea? import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.TextArea; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JP

  • Problem Integrating Flash Slideshow

    Hi there, I just found a Flash slideshow that I liked and tried to create a template page with it. Everything works fine; however, the Flash slideshow is only incorporated in the page after a line break. I see the <p> tag that causes the show not to