User Exit to capture Archivelink usage

In our 4.7 R/3 environment, we implemented a user exit to capture when a user displays a document.  It captures the user, document viewed, etc and writes the updates an entry on a z table.  The user exit is in the Exit_SAPLOPTM_001 function.  The user exit works great in that environment. 
We would like to implement something similar in the ECC 6.0 environment.  We traced
the CMOD component which provides an exit point for the function "ARCHIVELINK_FUNCTION".   Our current archiving process is not flowing this function, so it will not hit the user exit.  Has anybody implemented a similar process in ECC 6.0 or does anybody have any recommendations?

You can define a BADI implementation of ALINK_AUTH_CON

Similar Messages

  • BADI/User Exit to capture DELETED DATE - MIRO/MIR7

    Hi Friends,
    Could anybody help me out in finding a BADI or User Exit (or some other means) so as to get the actual deleted date for the documents parked through MIRO/MIR7 ?
    (I have found a BTE to capture the deleted date for the documents parked through FB60/FV60.)
    Thanks in advance.
    Regards,
    Saravanan SR

    Hi Uday,
    User exits are:
    EXIT_SAPLMR1M_001 - MM08R002 - User exit for tolerance checks
    EXIT_SAPLMR1M_002 - LMR1M001  - User exits in Logistics Invoice Verification
    EXIT_SAPLMR1M_003 - LMR1M001  - User exits in Logistics Invoice Verification
    BADI's are:
    BADI_ENJ_ALT_ADR - Go to alternative vendor/customer data
    MR_CIN_LMR1MI2G_SEL - BAdi in LIV for determining line selection
    MR_CIN_LMR1MI2G - BAdI for India Version exit in include LMR1MI2G
    Regards,
    Sukhbold

  • User exit---to capture SO header text

    Hi all,
    Requirement is to maintain SO header texts (va02>goto>header-->texts) in a z table (i.e, acceptance numbers..like remark1, remark2,3  and 4).
    plz guide me from which structure we can capture this value..i mean runtime structure..
    I can use user-exit..MV45AFZZ--->userexit_delete_document
    or any otherwayz..?

    Hi Tuborg,
    Use Function module READ_TEXT.
    or u can follow the program.
    I think it will help u to fulfill ur requirement.
    *& Report  ZSO_TEXT_CHANGE
    REPORT  zso_text_change.
    TABLES : vbak,
             vbap,
             cfstructur.
    DATA : BEGIN OF itab OCCURS 0,
           vbeln LIKE vbak-vbeln,
           posnr LIKE vbap-posnr,
           text1(30),
           text2(30),
           text3(20),
           END OF itab.
    DATA : name LIKE stxh-tdname,
           l_tid LIKE stxh-tdid,
           obj LIKE stxh-tdid.
    *& CUSTOM CONTROL DATA DECLARATIONS
    DATA: init,
          container1 TYPE REF TO cl_gui_custom_container,
          container2 TYPE REF TO cl_gui_custom_container,
          container3 TYPE REF TO cl_gui_custom_container,
          editor1    TYPE REF TO cl_gui_textedit,
          editor2    TYPE REF TO cl_gui_textedit,
          editor3    TYPE REF TO cl_gui_textedit.
    DATA: event_tab TYPE cntl_simple_events,
          event     TYPE cntl_simple_event.
    data declarations for save long text
    TYPES: BEGIN OF type_text ,
           line(65),
    END OF type_text.
    DATA:text_tab1 TYPE STANDARD TABLE OF type_text,
         text_tab2 TYPE STANDARD TABLE OF type_text,
         text_tab3 TYPE STANDARD TABLE OF type_text,
         texttab1 LIKE LINE OF text_tab1,
         texttab2 LIKE LINE OF text_tab1,
         texttab3 LIKE LINE OF text_tab1,
                line(256) TYPE c,
                field LIKE line,
                lsel LIKE sy-lisel,
                lsel1 LIKE sy-lisel,
                lin LIKE sy-lilli,
                val(50),
                val_c(50),
                val_scr(50),
                scr_val(50),
                val1(6),
                l_posnr LIKE vbap-posnr,
                l_posnr1 LIKE vbap-posnr,
                l_text1(30),
                l_vbeln LIKE vbap-vbeln.
    DATA: textlines LIKE tline-tdline OCCURS 0.
    DATA: ls_thead LIKE thead.
    DATA: lt_tline1 LIKE TABLE OF tline WITH HEADER LINE,
          lt_tline2 LIKE TABLE OF tline WITH HEADER LINE,
          lt_tline3 LIKE TABLE OF tline WITH HEADER LINE.
    DATA BEGIN OF header OCCURS 10.
            INCLUDE STRUCTURE thead.
    DATA END OF header.
    DATA: gcontrol  LIKE cfcontrol,
            l_subrc LIKE sy-subrc.
    DATA: BEGIN OF pc_tab OCCURS 10,
            line LIKE tline-tdline,
          END OF pc_tab.
    DATA: BEGIN OF pc_tab1 OCCURS 10,
            line LIKE tline-tdline,
          END OF pc_tab1.
    DATA: long_file(23) TYPE c.
    PARAMETERS : vbeln LIKE vbak-vbeln OBLIGATORY.
    SELECT-OPTIONS : posnr FOR vbap-posnr.
    INITIALIZATION.
      CLEAR : pc_tab.
      REFRESH pc_tab.
    START-OF-SELECTION.
      SELECT vbeln posnr
      FROM vbap
      INTO TABLE itab
      WHERE vbeln = vbeln
      AND   posnr IN posnr.
    LOOP AT itab.
       itab-text1 = 'Material sales text'.
       itab-text2 = 'Technical Specifications'.
       itab-text3 = 'Packing Note'.
       MODIFY itab TRANSPORTING text1 text2 text3.
    ENDLOOP.
    END-OF-SELECTION.
      WRITE: /5 'Header Level Text' COLOR 5.
      SKIP 3.
      WRITE:  /5 'General Remarks in Amendment',
              /5 'General Specifications',
              /5 'Instructions to Accounts ',
              /5 'Instructions to Product Engg',
              /5 'Instructions to Electrical ',
              /5 'Instructions to Service  ',
              /5 'Instructions to Despatch ',
              /5 'Instructions to Works ',
              /5 'Instructions to MMD      ',
              /5 'Instructions to OED ',
              /5 'Instructions to Project Markt',
              /5 'Painting Details ',
              /5 'Docs. Reqd. for Insp. Call ',
              /5 'Docs. to be sent with Invoice ',
              /5 'Spl action plan for SO Exec',
              /5 'Spl. Inst. for record keeping ',
              /5 'Customer Comm. Address ',
              /5 'Customer Supplied Products ',
              /5 'Cust. prods/traceability reqts ',
              /5 'Qualification Tests ',
              /5 'Instrument Calib. data to Cust ',
              /5 'Test Cert. reqd. for submisn ',
              /5 'Customer Inspection Stages  ',
              /5 'Un resolved points  ',
              /5 'Regret Reason ',
              /5 'Terms of payment ',
              /5 'Additional Commercial Terms ',
              /5 'Escalation',
              /5 'Mode of Despatch Details ',
              /5 'Packing Details ',
              /5 'QAP Details ',
              /5 'Approved Transporters ',
              /5 'Eye Catch ',
              /5 'LOI Details ',
              /5 'Delivery Details ',
              /5 'Order Description ',
              /5 'Penalty / LD Clause ',
              /5 'Activity Completion Schedule ',
              /5 'Inspection Details',
              /5 'Checked By ',
              /5 'Authorised By',
              /5 'Distribution',
              /5 'Send Original&Dupl. Inv. to',
              /5 'Send Copies of Inv.&Challan to ',
              /5 'Send R/R & L/R to',
              /5 'Bankers Name & Address',
              /5 'Sales Tax Details',
              /5 'Excise Duty Details',
              /5 'CST Number & Date',
              /5 'SST Number & Date',
              /5 'Bank Charges Details',
              /5 'Price Basis Details',
              /5 'Freight Details',
              /5 'Customer Collection Details',
              /5 'Road Permit Details',
              /5 'Insurance Details'.
      SKIP 5.
      WRITE: /25 'Item Level Text' COLOR 5.
      ULINE AT /24(20).
      SKIP 3.
      LOOP AT itab.
        WRITE: /5 itab-posnr.
        l_text1 = 'Technical Specifications'.
        WRITE  : 20 l_text1.
        CLEAR l_text1.
        l_text1 = 'Material sales text'.
        WRITE  : 50 l_text1.
        CLEAR l_text1.
        l_text1 = 'Packing Note'.
        WRITE  : 80 l_text1.
        HIDE : l_text1.
      ENDLOOP.
      CLEAR itab.
    AT LINE-SELECTION.
      CLEAR : lsel, lsel1.
      REFRESH text_tab2.
      lsel = sy-lisel.
      SHIFT lsel LEFT DELETING LEADING space.
      l_posnr = lsel+0(6).
      val1 = l_posnr.
    lin = sy-lilli.
    READ LINE lin FIELD VALUE itab-text1 .
      GET CURSOR FIELD l_text1 VALUE val.
      val_c = val.
      IF l_posnr IS NOT INITIAL.
        IF val = val1.
          MESSAGE s398(00) WITH 'Select a Item text'.
        ELSE.
          PERFORM itab_text.
          CALL SCREEN 0100.
        ENDIF.
      ELSEIF l_posnr IS INITIAL.
        PERFORM read_text.
        CALL SCREEN 0100.
      ENDIF.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZMENU'.
    SET TITLEBAR 'xxx'.
      IF l_posnr IS NOT INITIAL.
        CLEAR val_scr.
        CONCATENATE l_posnr '-' val INTO val_scr SEPARATED BY space.
        scr_val = val_scr.
      ELSE.
        scr_val = val.
      ENDIF.
      CLEAR :val_scr,l_posnr,val.
      INITIALIZING TEXT EDIT CUSTOM CONTROL
      IF init IS INITIAL.
        init = 'X'.
        CREATE OBJECT: container1 EXPORTING container_name = 'CUSTOM1',
                       editor1    EXPORTING parent = container1
    WORDWRAP SET SO THAT TEXT DOES NOT EXCEED THE INTERNAL TABLE FIELD
    *LENGTH.
    wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
    wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
    wordwrap_position = '60'
    wordwrap_to_linebreak_mode = cl_gui_textedit=>true,
                       container2 EXPORTING container_name = 'CUSTOM2',
                       editor2    EXPORTING parent = container2
    wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
    wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
    wordwrap_position = '60'
    wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
        CALL METHOD editor1->set_text_as_r3table
          EXPORTING
            table = text_tab1.
        CALL METHOD editor2->set_text_as_r3table
          EXPORTING
            table = text_tab2.
        CALL METHOD editor1->delete_text.
        CALL METHOD editor2->delete_text.
    ELSE.
       CALL METHOD editor2->delete_text.
      ENDIF.
      CALL METHOD editor1->set_text_as_r3table
        EXPORTING
          table = text_tab1.
      CALL METHOD editor2->set_text_as_r3table
        EXPORTING
          table = text_tab2.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'DOWNLOAD'.
          PERFORM header1.
          PERFORM header.
          PERFORM download ."changing COM_FILE LIKE LONG_FILE.
       WHEN 'SAVE'.
         PERFORM header1.
         PERFORM header.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          SET SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  read_text1
          text
    -->  p1        text
    <--  p2        text
    FORM read_text1 USING   p_l_tid.
      CLEAR : lt_tline1.
      REFRESH text_tab1.
      l_tid = p_l_tid.
      name = vbeln.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
      CLIENT                        = SY-MANDT
          id                            = p_l_tid
          language                      = 'E'
          name                          = name
          object                        = 'VBBK'
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
        TABLES
          lines                         =  lt_tline1
    EXCEPTIONS
       id                            = 1
       language                      = 2
       name                          = 3
       not_found                     = 4
       object                        = 5
       reference_check               = 6
       wrong_access_to_archive       = 7
       OTHERS                        = 8
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        EXIT.
      ENDIF.
      LOOP AT lt_tline1 .
       move-corresponding lt_tline1 to TEXT_tab1.
        APPEND lt_tline1-tdline TO text_tab1 .
       move '/' to lt_tline3-tdformat.
      ENDLOOP.
      REFRESH text_tab2.
    ENDFORM.                    " read_text1
    *&      Form  read_text
          text
    -->  p1        text
    <--  p2        text
    FORM read_text .
      CASE lsel.
        WHEN 'General Remarks in Amendment'.
          PERFORM read_text1 USING 'Z070'.
        WHEN 'General Specifications'.
          PERFORM read_text1 USING 'Z001'.
        WHEN 'Instructions to Accounts'.
          PERFORM read_text1 USING 'Z002'.
        WHEN 'Instructions to Product Engg'.
          PERFORM read_text1 USING 'Z003'.
        WHEN 'Instructions to Electrical'.
          PERFORM read_text1 USING 'Z004'.
        WHEN 'Instructions to Service'.
          PERFORM read_text1 USING 'Z005'.
        WHEN 'Instructions to Despatch'.
          PERFORM read_text1 USING 'Z006'.
        WHEN 'Instructions to Works'.
          PERFORM read_text1 USING 'Z007'.
        WHEN 'Instructions to MMD'.
          PERFORM read_text1 USING 'Z008'.
        WHEN 'Instructions to OED'.
          PERFORM read_text1 USING 'Z009'.
        WHEN 'Instructions to Project Markt'.
          PERFORM read_text1 USING 'Z037'.
        WHEN 'Painting Details'.
          PERFORM read_text1 USING 'Z010'.
        WHEN 'Docs. Reqd. for Insp. Call'.
          PERFORM read_text1 USING 'Z011'.
        WHEN 'Docs. to be sent with Invoice'.
          PERFORM read_text1 USING 'Z012'.
        WHEN 'Spl action plan for SO Exec'.
          PERFORM read_text1 USING 'Z013'.
        WHEN 'Spl. Inst. for record keeping'.
          PERFORM read_text1 USING 'Z014'.
        WHEN 'Customer Comm. Address'.
          PERFORM read_text1 USING 'Z015'.
        WHEN 'Customer Supplied Products'.
          PERFORM read_text1 USING 'Z016'.
        WHEN 'Cust. prods/traceability reqts'.
          PERFORM read_text1 USING 'Z017'.
        WHEN 'Qualification Tests'.
          PERFORM read_text1 USING 'Z018'.
        WHEN 'Instrument Calib. data to Cust'.
          PERFORM read_text1 USING 'Z019'.
        WHEN 'Test Cert. reqd. for submisn '.
          PERFORM read_text1 USING 'Z020'.
        WHEN 'Customer Inspection Stages '.
          PERFORM read_text1 USING 'Z021'.
        WHEN 'Un resolved points '.
          PERFORM read_text1 USING 'Z022'.
        WHEN 'Regret Reason '.
          PERFORM read_text1 USING 'Z023'.
        WHEN 'Terms of payment '.
          PERFORM read_text1 USING 'Z120'.
        WHEN 'Previous Sales Order '.
          PERFORM read_text1 USING 'Z040'.
        WHEN 'Escalation'.
          PERFORM read_text1 USING 'Z041'.
        WHEN 'Mode of Despatch Details '.
          PERFORM read_text1 USING 'Z042'.
        WHEN 'Packing Details '.
          PERFORM read_text1 USING 'Z043'.
        WHEN 'QAP Details '.
          PERFORM read_text1 USING 'Z044'.
        WHEN 'Approved Transporters  '.
          PERFORM read_text1 USING 'Z045'.
        WHEN 'Eye Catch  '.
          PERFORM read_text1 USING 'Z046'.
        WHEN 'LOI Details  '.
          PERFORM read_text1 USING 'Z047'.
        WHEN 'Delivery Details  '.
          PERFORM read_text1 USING 'Z048'.
        WHEN 'Order Description  '.
          PERFORM read_text1 USING 'Z049'.
        WHEN 'Penalty / LD Clause '.
          PERFORM read_text1 USING 'Z050'.
        WHEN 'Activity Completion Schedule  '.
          PERFORM read_text1 USING 'Z051'.
        WHEN 'Inspection Details '.
          PERFORM read_text1 USING 'Z052'.
        WHEN 'Checked By '.
          PERFORM read_text1 USING 'Z053'.
        WHEN 'Authorised By  '.
          PERFORM read_text1 USING 'Z054'.
        WHEN 'Distribution '.
          PERFORM read_text1 USING 'Z055'.
        WHEN 'Send Original&Dupl. Inv. to  '.
          PERFORM read_text1 USING 'Z056'.
        WHEN 'Send Copies of Inv.&Challan to '.
          PERFORM read_text1 USING 'Z057'.
        WHEN 'Send R/R & L/R to  '.
          PERFORM read_text1 USING 'Z058'.
        WHEN 'Bankers Name & Address  '.
          PERFORM read_text1 USING 'Z059'.
        WHEN 'Sales Tax Details  '.
          PERFORM read_text1 USING 'Z060'.
        WHEN 'Excise Duty Details  '.
          PERFORM read_text1 USING 'Z061'.
        WHEN 'CST Number & Date  '.
          PERFORM read_text1 USING 'Z062'.
        WHEN 'SST Number & Date  '.
          PERFORM read_text1 USING 'Z063'.
        WHEN 'Bank Charges Details '.
          PERFORM read_text1 USING 'Z064'.
        WHEN 'Price Basis Details '.
          PERFORM read_text1 USING 'Z065'.
        WHEN 'Freight Details  '.
          PERFORM read_text1 USING 'Z066'.
        WHEN 'Customer Collection Details  '.
          PERFORM read_text1 USING 'Z067'.
        WHEN 'Road Permit Details  '.
          PERFORM read_text1 USING 'Z068'.
        WHEN 'Insurance Details '.
          PERFORM read_text1 USING 'Z069'.
      ENDCASE.
    ENDFORM.                    " read_text
    *&      Form  itab_text
          text
    -->  p1        text
    <--  p2        text
    FORM itab_text .
    LOOP AT itab WHERE posnr = posnr.
       IF itab-posnr = lsel.
       CASE lsel.
         WHEN lsel.
      READ TABLE itab WITH KEY posnr = l_posnr.
      lsel1 = l_posnr.
      l_posnr1 = l_posnr.
      SHIFT lsel1 LEFT DELETING LEADING space.
      CONCATENATE itab-vbeln lsel1 INTO lsel1.
      CASE val.
        WHEN 'Material sales text'.
          PERFORM read_text2 USING '0001'.
        WHEN 'Technical Specifications'.
          PERFORM read_text2 USING 'Z001'.
        WHEN 'Packing Note'.
          PERFORM read_text2 USING 'Z005'.
      ENDCASE.
       ENDIF.
    ENDLOOP.
    ENDFORM.                    " itab_text
    *&      Form  read_text2
          text
         -->P_LSEL  text
    FORM read_text2 USING  p_lsel.
      CLEAR : lt_tline1.
      REFRESH text_tab1.
      CLEAR name.
      CLEAR obj.
    DATA : name LIKE stxh-tdname.
      name = lsel1.
      obj = p_lsel.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
      CLIENT                        = SY-MANDT
          id                            = p_lsel
          language                      = 'E'
          name                          = name
          object                        = 'VBBP'
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
        TABLES
          lines                         =  lt_tline1
    EXCEPTIONS
       id                            = 1
       language                      = 2
       name                          = 3
       not_found                     = 4
       object                        = 5
       reference_check               = 6
       wrong_access_to_archive       = 7
       OTHERS                        = 8
      IF sy-subrc <> 0.
        CLEAR lsel1.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        EXIT.
      ENDIF.
      LOOP AT lt_tline1 .
       move-corresponding lt_tline1 to TEXT_tab1.
        APPEND lt_tline1-tdline TO text_tab1 .
       move '/' to lt_tline3-tdformat.
      ENDLOOP.
    ENDFORM.                    " read_text2
    *&      Form  save_text
          text
    -->  p1        text
    <--  p2        text
    FORM save_text1 ."USING p_l_tid.
      CALL METHOD editor2->get_text_as_r3table
        IMPORTING
          table = text_tab2.
      CLEAR lt_tline2.
      REFRESH lt_tline2.
      MOVE '*' TO lt_tline2-tdformat.
      LOOP AT text_tab2 INTO texttab2.
        MOVE texttab2 TO lt_tline2-tdline.
        APPEND lt_tline2.
        MOVE '/' TO lt_tline2-tdformat.
      ENDLOOP.
    HEADER-TDOBJECT = 'VBBK'.
    HEADER-TDNAME = p_l_tid.
    HEADER-TDID = 'ZTC1'.
    HEADER-TDSPRAS = 'EN'.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
      CLIENT                = SY-MANDT
          header                = header
      INSERT                = ' '
       savemode_direct       = 'X'
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
       newheader             = ls_thead
    TABLES
          lines                 = lt_tline2.
    EXCEPTIONS
      ID                    = 1
      LANGUAGE              = 2
      NAME                  = 3
      OBJECT                = 4
      OTHERS                = 5    .
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSEIF sy-subrc  = 0.
       MESSAGE i398(00) WITH 'Text Saved'.
      ENDIF.
    ENDFORM.                    " save_text1
    *&      Form  header
          text
    -->  p1        text
    <--  p2        text
    FORM header .
      PERFORM save_text1 .
    ENDFORM.                    " header
    *&      Form  header1
          text
    -->  p1        text
    <--  p2        text
    FORM header1 .
      IF lsel1 IS NOT INITIAL.
        CLEAR header.
        REFRESH header.
        header-tdobject = 'VBBP'.
        header-tdname   = name.
        header-tdid     = obj.
        header-tdspras  = 'EN'.
        APPEND header.
      ELSEIF lsel1 IS INITIAL.
        CLEAR header.
        REFRESH header.
        header-tdobject = 'VBBK'.
        header-tdname = vbeln.
        header-tdid = l_tid.
        header-tdspras = 'EN'.
        APPEND header.
      ENDIF.
    ENDFORM.                                                    " header1
    *&      Form  download
          text
    -->  p1        text
    <--  p2        text
    FORM download ."CHANGING .
    DATA : dcp_file   LIKE long_file.
      DATA fullpath TYPE string.
      l_vbeln = vbeln.
      SHIFT l_vbeln LEFT DELETING LEADING '0'.
    concatenate 'C:\' l_vbeln '.txt' into   gcontrol-directory.
      CONCATENATE 'C:\' l_vbeln '.doc' INTO   fullpath.
    gcontrol-directory
      = 'C:\Text.txt'.
      = 'C:\Documents and Settings\Subhasis Mukherjee\Desktop\Text.txt'.
      CLEAR pc_tab.
      REFRESH pc_tab.
      IF l_posnr1 IS NOT INITIAL.
        CONCATENATE l_posnr1 '-' val_c INTO val_c SEPARATED BY space.
      ENDIF.
      pc_tab = val_c.
      APPEND pc_tab.
      pc_tab = 'Previous Text'.
      APPEND pc_tab.
         DO 2 TIMES.
      pc_tab = ''.
      APPEND pc_tab.
         ENDDO.
      LOOP AT text_tab1 INTO texttab1.
       IF sy-tabix = 1.
         IF l_posnr IS NOT INITIAL.
           CONCATENATE l_posnr '-' val INTO val SEPARATED BY space.
         ENDIF.
         pc_tab = val.
         APPEND pc_tab.
         pc_tab = 'Previous Text'.
         APPEND pc_tab.
         DO 2 TIMES.
         pc_tab = ''.
         APPEND pc_tab.
         ENDDO.
       ENDIF.
        pc_tab = texttab1-line.
        APPEND pc_tab.
       AT LAST.
         pc_tab = '***************************'.
         APPEND pc_tab.
       ENDAT.
      ENDLOOP.
      LOOP AT text_tab2 INTO texttab2.
        CLEAR pc_tab.
        IF sy-tabix = 1.
          DO 3 TIMES.
            pc_tab = ''.
            APPEND pc_tab.
          ENDDO.
          pc_tab = 'Changed Text'.
          APPEND pc_tab.
           DO 2 TIMES.
          pc_tab = ''.
          APPEND pc_tab.
           ENDDO.
        ENDIF.
        pc_tab = texttab2-line.
        APPEND pc_tab.
        AT LAST.
          pc_tab = '- - - - - - - - - - - - - - - - - - - - - - - - - - - '.
          APPEND pc_tab.
        ENDAT.
      ENDLOOP.
         CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
         EXPORTING
           window_title      = 'Path'
           default_extension = 'C:\'
           default_file_name = 'TEST.XLS'
         IMPORTING
           fullpath          = fullpath.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = fullpath
          filetype                = 'ASC'
          append                  = 'X'
        TABLES
          data_tab                = pc_tab
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        MESSAGE s001(00) WITH 'File downloaded successfully'.
      ENDIF.
    ENDFORM.                    " download
    Reward points pls if it is helpfull
    Regards
    Srimanta

  • User exit -Capture excise invoice ..?

    Hi All
    Can anybody guide me ,
    How to customise the user exit , while capture the dealer excise invoice .
    If the MRP iindicator is not flaged , system should the error messge like "the MRP indicator is not flaged"
    The above user exit only for delear excise invoice capturing ..?
    If any other alternatives are there for this issue , becas some time core user missing to flag the MRP indicator while capturing the delear excise invoice .
    Thnaks
    sap-mm

    hi
    pls check following userexit with your ABAP consultant. I hope it will be useful.
    J_1I7_USEREXIT_J1IEX_BEF_SAVE      =    User exit for J1IEX before the data is saved
    Regards,
    Rahul

  • Need User Exit before the Purchase Order saved!!!

    Hai All,
        I am in search for User Exit before the Purchase Order gets saved.This User Exit should capture this generated Purchase Order and post it to the Destination System for further processing.
        Can anyone help me to find this User Exit.
    Thanks,
    Ugandhar.<b></b><b></b>
    Message was edited by: Ugandhar Domathoti

    Check out this enchancement in smod <b>MM06E001</b>
    in that EXIT_SAPLEINM_001
            EXIT_SAPLEINM_002
    may help you ....
    regards
    vijay

  • User exit at  MIGO transaction

    Hi experts, I hope your doing well,
    I am looking for an user exit in order to capture information at the good receipt level, for example at header text.
    and also,other user exit to capture information at the batch level (in this case I would like to link any batch with a number).
    Could you help me? in both cases in the MIGO transaction
    Thanks in advance,
    which of these?
    MBCF0002 Customer function exit: Segment text in material doc. item
    MBCF0005 Material document item for goods receipt/issue slip
    MBCF0006 Customer function for WBS element
    MBCF0007 Customer function exit: Updating a reservation
    MBCF0009 Filling the storage location field
    MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011 Read From RESB and RKPF For Print List in MB26
    MBCFC003 Maintenance of batch master data for goods movements
    MBCFC004 Maintenance of batch specifications for goods movements
    Ignacio

    Hi
    For batch level below are the exits
    User Exits
    Form CHARGE_VORSCHLAGEN
               Propose batch using CFC
              CUSTOMER-FUNCTION '010'
    Form UMCHARGE_VORSCHLAGEN
               Propose transfer batch using CFC
              CUSTOMER-FUNCTION '010'
    have tried the FM MIGO_CUST_FIELDS_GENERATE for own fields

  • QA10 User Exit to run addational code for Material Backflush

    Does anyone know if there is a User Exit for QA10 Automatic Usage Decision that will allow you to tack on additional code to complete a material backflush.  I have a batchjob that runs every 5 minutes which fires off a variant to evaluate the Inspection Results.  If all results recording are good the UD gets completed and the material is moved from QI Stock to Unrestricted.  At the same time once the UD and stock transfer is done I would like to run a User exit that will allow me to access a custom lookup table to change the material from CP14.B1 to CP14 and complete a backflush.

    Yes you are correct in saying that I want to do another Backflush once the auto UD is completed.  The scheduled job using program RQEVAI30 completes the UD and posts the material from QI Stock to Unrestricted Stock if results are good.  Once the UD is completed and the stock is posted to Unrestricted I need to find a User Exit that will allow me to write custom code to do a table lookup.  This table will also be custom development that we can use to say if material is CP14.B1 and the Insp. Lot Type is 04 then run MFBF to backflush raw material and complete movement type 309 to CP14 Material.  I just need to know if there is a User exit available that I can use once the lot evaluation is completed.

  • User exit for MM42: force PRCTR

    Hello!
    When user changes material, I want to forcefully provide profit center for given plant (field MARC-PRCTR). This field is located in the "Logistics - store -> Other Logistics Data" view.
    I tried with enhancements MGW00001 and MGW00002, but not none of them triggered when I saved data in MM42.
    How can I use MGW00001 and MGW00002, i.e. on which operation are they triggered? I guess MGW00002 runs only at article creation (Article number assignment), but what about MGW00001?
    Is there some other way achieve this?
    Thanks in advance for your replies!
    Kind regards,
    Igor

    What is your specific requirement . User exits are there but usage should be known to satisfy a particular functionality.
    For MM41/42 following SMOD enhancements are there -
    MGW00001            Material Master (Retail): Additional Data     
    MGW00002            Material Master (Retail): Number Assignment   
    Cheers.
    Sanjay

  • Hi user exit code required

    hi all,
          i have one requirement i.e when ever we give tcode xd06 or xd02 if customerno is there it wont accept the same customer again if customer is not there it has to insert the customer into the table. i require code for this requirement i need to write this in include called ZXF04U01and function module name is EXIT_SAPMF02D_001.
    Write below custom code inside the user exit to capture CRSID information in reverse mapping input table ZW2CTREV_MAP to trigger reverse mapping.
    Declare a work area WA_ZW2CTREVMAP of type ZW2CTREV_MAP.
    Assign values from I_KNA1 to work area WA_ZW2CTREVMAP.
    MODIFY TABLE ZW2CTREV_MAP FROM WA_ZW2CTREVMAP.
    above i have shown procedure for code.  send me the actual code what i have to write in include to check customer and insert customer pls reply as early as possible.
    regards
    sagar

    Hi,
    Let s say
    var1 is from varaible
    var2 is to variable
    var3 is user exit variable
    USe the code like this:
    DATA:
    l_s_range TYPE rsr_s_rangesid,
    l_s_var TYPE rrs0_s_var_range.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    DATA: LOC_VAR_RANGE2 LIKE RRRANGEEXIT.
    WHEN 'VAR3'.
        IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR1'.
          LOOP AT I_T_VAR_RANGE2 INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR2'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(8).
            L_S_RANGE-HIGH = LOC_VAR_RANGE2-LOW(8).
    IF LOC_VAR_RANGE2(8) = '00000000'.
            L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW(8).
    ENDIF.
    IF LOC_VAR_RANGE(8) = '00000000'.
            L_S_RANGE-LOW = LOC_VAR_RANGE2-LOW(8).
    ENDIF.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT  = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
          ENDLOOP.
          EXIT.
          ENDLOOP.
        ENDIF.
    With rgds,
    Anil Kumar Sharma .P

  • User Exits for Item Category Determination based on Item Category Usage

    Hi Gurus,
    If I need to create a new item category usage code and perform item category determination using the new item category usage code, is there a user exit or function module which is able to perform this?
    Thanks & Regards

    Hi Lawrence Tam,
             If you are going to create a new item category usage to determine an item category, you need to add a new line in transaction VOV4 for the new combination of sales document type + Item Cat. group + usage + high leve item cat. to determine the item category.
    Thanks in advance,
    Mariano.

  • User Exit / Enhancement for Master Serial Number Capture ....Pls help !!!

    Hi,
    My requirement is: When I Enter a Master Serial Number, For Ex. my master serial number is of format SXXNNNNNNNK,
    *where XX is the number of Serial numbers to capture.*
    *If XX = 15, i need to capture 15 serial numbers.*
    *NNNNNNN is the series of the serial number beginning.*
    *If NNNNNNN = 1234500, and XX = 5, the Master Serial numbers generated would be 1234500 1234501 1234502 1234503 1234504*
    *(5 S/Ns should be generated).*
    (S and K can be left alone).
    Now When i enter the Master Serial Number SXXNNNNNNNK, and when I press enter, internally a User Exit should be triggered and generate the required number of S/Ns.
    Can anyone please help me out what is the User Exit i need to use so that my requirement as mentioned above is fulfilled?
    *Thanks in advance,*
    *saikumar*

    Hi,
         You can use the user exit include - MV45AFZZ and the subroutine FORM USEREXIT_NUMBER_RANGE.
    Hope it helps.
    Reward if it is useful.
    Thanks,
    Srinivas

  • User Exit for Incoming Excise invoice capture(MIGO)-clarification

    Hi all,
    We are using mySAP ECC 5.0 version with CIN Configuration made. In this, if Excise Duty value is zero, then excise invoice pop-up should not come. But the system asks for it, and the user has to manually change the excise action as 'No Excise Entry'. To avoid this, we have a idea of using some user exit to do this automatically.
    We have added the following source code in the user exit 'J_1I7_MIGO_DEFAULT'
    IF CS_EXHEAD-TOTAL_BED = 0.
    CS_EXHEAD-EXCISE_ACTION = '06'.
    endif.
    But, irrespective of the excise duty value(CS_EXHEAD-Total_BED) system determines the action as '06' i.e.'No excise entry.But still it asks for excise invoice also!!!
    How to resolve this? Should some corrections should be made on this source code? or the option of 'pass values' needs to be selected in the user exit?
    Suggest
    Gowtham

    Hey,
    Can you give the enhacement name from SMOD (MBCF0006) ?
    -Kiran

  • User exit for IW31 which capture screen field Po number

    Hi all
    I have the requirement that when we save work order created by IW31. It shud trigger any user exit or BADI.
    In that we have to validate the screen field Purchase order number BSTKD from the Ztable entries.
    My problem is that no user exit passes this value as export parameter. so without that how can I get this value in the include program. Please let me know the user exit which hit after save and passes PO value so I can validate this field.   Thanks!!!
    Quick answer will highly be appreciated!!
    Nikhilesh Vyas

    Hello Kiran
    Thanks for ur reply
    But this Badi does not have purchase order number as parameter in any method which call after user press save button.
    Please let me know any other alternative if u have ...thanks!!

  • About user exit usage

    Hai SAP Experts
    I want know the full details of USER EXIT,Use of user exit, where it can find and it where it will assigned to get our requirements
    Including Basic, Can anyone explain inthis regards please
    Note : I am the functional consultant
    Thank U

    Hi,
    I guess it would be very hard for anyone to provide you with full details of user exit, as its a very open ended qns. Anyways just a few things, a user exist is a enhancement to SAP std program where-in you can add-in your custom logic to enhance the program to meet your specific needs. There are loads of user exits, so to check the one which meets your need, go to SMOD, click F4 & you should find SAP applications, click on that & then branch into the one which meets your specific need.
    Now once you know which exit to use, go to CMOD & you need to create a project for this User-exit & activate the implementation. This is done by the technical person, so from your end, you would need to specify the logic which you would need.
    Hope the above was of some help.
    Regards,
    Vivek

  • What are the user-exits which will trigger on saving Sales Order

    Hello Experts!!!
    I am working on Sales Order VA01. The requirement is I need to pre populate Sold-to-Party field. I find out user-exit (V45A0002  Predefine sold-to party in sales document  ). So it is working fine.
    Now second requirement is I need to capture all the date once user saves Sales Order. Also the time or Sales Order creation I have to make u2018GRAYu2019 some of the fields so user cannot change the value. Can anybody tell me which user-exits should I use to retrieve the entire information user entered and lock fields in Sales Order screen?
    Thanks a lot on advance.

    Hi
    U can't find it there,because it's a include, not enanchement.
    So u need to use the trx SE38, not CMOD.
    For sales ored there aren't the enanchements, but only some FORMs defined in particular includes.
    U need to get the access key by OSS in order to change them.
    These are the rest of the includes where u can find other exits:
           INCLUDE MV45ATZZ.            " Data definitions in MV45ATOP
             INCLUDE MV45AOZZ.             " User-modules PBO
             INCLUDE MV45AIZZ.             " User-modules PAI
             INCLUDE MV45AFZA.             " User-forms < 3.0
             INCLUDE MV45AFZB.             " User-forms
             INCLUDE MV45AFZC.             " User-forms < 3.0D
             INCLUDE MV45AFZD.             " User-forms   3.0E
             INCLUDE MV45AFZF.             " User-forms   3.0F
           include mv45afzg.             " User-forms   3.1G
             INCLUDE MV45AFZH.             " User-forms   4.6B
             INCLUDE MV45AFZZ.             " User-forms
             INCLUDE MV45AFZ4.             " User-forms   4.0
    Anyway u can find some information about these exit in customizing (trx SPRO):
    Sales and Distributions->System modifications->User exits
    Max

Maybe you are looking for