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

Similar Messages

  • User Exits for Purchase order Header Text Validation

    Hi Experts,
    I need user exit for validate a  Long text in Purchase order header data for a Particular Doc type.
    We are using 4.6 B so badi is not available .
    So pls tell me user exit for the same or any other method as i was unable to find user exit for this scenario.
    Note :  This valiadation should trigger whhile creating  PO.
    Warm Regards
    Santosh Kumar
    Edited by: Santosh L on Mar 19, 2010 9:58 AM

    i have used concept of global memory through call stack

  • 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

  • User exit/BADI for material Po text

    HI,
    can any one suggest me User Exit/BAdi for material PO text in item level in PO
    Regards

    USE ME_PROCESS_PO_CUST
    METHOD : PROCESS_ITEM
    REGARDS
    KANISHAK

  • User Exit to update Sales order text (Terms of delivery) on saving it

    Hi Experts ,
    I have a requirement where I want to update the sales order header text (terms of delivery)  on saving of PO with Partners details such as first name , and last name etc,
    Please suggest an user exit or any other enhancement where I can update the header text automatically w/o going into the texts.
    Thanks .

    Hi,
    Any texts have to be maintained making use of FM SAVE_TEXT.
    For eg if i want to update the Order Confirmation text, i will use the FM as follows:-
    data : header type THEAD.
    data : lines type standard table of TLINE .
    data : wa_line type tline.
    header-TDOBJECT = 'VBBK'.
    header-TDNAME = '0000003561'. "sales order number or text name
    header-TDID =  'Z007'.    " Confirmation text - text id
    header-TDSPRAS = sy-langu.
    wa_line-TDFORMAT = '*'.              "paragraph format
    wa_line-TDLINE = 'This is 1st line of text'.
    append wa_line to lines.
    wa_line-TDFORMAT = '*'.
    wa_line-TDLINE = 'This is 2nd line of text'.
    append wa_line to lines.
    CALL FUNCTION 'SAVE_TEXT'
      EXPORTING
        CLIENT                = SY-MANDT
        header                = header
      tables
        lines                 = lines
    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.
    ENDIF.
    Here the details of
    TDOBJECT, TDNAME, TDID and TDSPRAS can be obtained by double clicking on the particular text in the sales order. It will open the text editor and then from menu go to Header.
    In this way you can save any text.
    Similarly if you want to read any text then make use of FM READ_TEXT.
    I hope you understand.
    Regards,
    Ankur Parab

  • User exit or badi for item text in mir7 transaction

    Hi Gurus,
    Please provide me suitable user exit or enhancement or badi for this requirement.
    client enter TEXT fied data in MIGO transaction for material document and purchase order in where tab.
    in MIR7 i entered reference number as material document number and purchase order number after triggering enter button it gives the list of items but IT IS NOT GIVE THE ITEM TEXT DATA which we entered in MIGO transaction.
    Please provide me suitable user exit or enhancement or BADI for this.
    Thanks A lot in Advance.
    With Regards,
    Radhakrishna.

    Hi RadhaKrishna,
    You can find the BADI by yourself just follow the below any methods you will get the appropriate BADI name..
    Method 1:
    Go to Tranaction: SE24.
    open class CL_EXITHANDLER
    Open the method " GetInstance"
    Put Break point in the statement
    call method cl_exithandler=>get_class_name_by_interface
    Now execute the Transaction which you need teh BDC it will automatically stops at the the method. In debugging mode double click on the variable: " exit_name" It will return the BADI Name.
    Method 2:
    find the Package name and go to the tranaction SE84.
    Enter the package name
    inside the left navaigaiton panel there is one option " Enhancements" click on this enhancement and then enter the package name and execute it. you will get hte number of enhancement.
    for your reference I am sending you the list of BADI present in MIRO transaction.
    ARC_MM_MATBEL_CHECK --------Check AddOn-Specific Criteria for MM_MATBEL
    ARC_MM_MATBEL_WRITE ---------- Archive AddOn-Specific Data for MM_MATBEL
    MB_CHECK_LINE_BADI  -------------- BAdI: Check Line Before Copying to the Blocking Tables
    MB_CIN_LMBMBU04     --------------- posting of gr
    MB_CIN_MM07MFB7     ---------------- BAdI for India Version exit in include MM07MFB7
    MB_CIN_MM07MFB7_QTY  ------------Proposal of quantity from Excise invoice in GR
    MB_DOCUMENT_BADI     --------------BAdIs when Creating a Material Document
    MB_DOCUMENT_UPDATE   -----------BADI when updating material document: MSEG and MKPF
    MB_MIGO_BADI        --------------------- BAdI in MIGO for External Detail Subscreens
    MB_MIGO_ITEM_BADI    ----------------BAdI in MIGO for Changing Item Data
    MB_RESERVATION_BADI  --------------MB21/MB22: Check and Complete Dialog Data
    Thanks,
    Chidanand

  • 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 for VA21 - Opportunity Number Text

    Hi! I need to retrieve or do some checking on the Opportunity Number Header Text if this is filled or not when creating an invoice/quotation. I've already done this for the checking on VA23, I used FM read_text and it works. But for the checking on VA21, I can't retrieve the text. This is because FM read_text requires
    1. ID - TDID
    2. Language - SPRAS
    3. Name - Doc Num
    4. Object - TDOBJECT
    and for VA21 since it technically still doesn't have a document number it can't read the text.
    Is there any temporary table/structure where the text is saved, where I can retrieve the text?

    Hi,
    I think you are checking the header text in a program (Use exit/BAdi) before saving the document right?  I have also faced the same scenario for tcode ME21N and ME22N. I resolved the issue in a BAdi .
    Before saving the document the text is available for ls_name = space. i.e name = ls_name.
    And the same text is available after saving the document for name = ls_name = Document number.
    Try with this.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = l_wa_textid_hdr-tdid
    language = sy-langu
    name = ls_name
    object = l_wa_textid_hdr-tdobject
    TABLES
    lines = it_lines
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    OTHERS = 8.
    Regards,
    Raju.

  • User Exit for managing Customer Master Texts- Urgent

    Hi All,
    I have a requirement in which the the Customer Master Central texts for certain text Id's are to be maintained in such a way via XD02 that whenever any changes are made and it is saved the changes become non editable and added with user date and time and then the user can add additional line of texts but cannot edit the earlier ones. So in this way the earlier texts are prevented from accidental deletion and any new addition has a stamp( User,date,time) to determine who changed it and when. I searcehd for any exit in the program but could find only one i.e. EXIT_SAPMF02D_001
    Is this requirement faesible in standard SAP?
    Now to me this exit could not serve any purpose.Please help.
    thanks,
    Manish

    Hi,
         use the following BADI's which will suitable for ur reqirement
    business Add-In CUSTOMER_ADD_DATA_CS .
    business Add-In CUSTOMER_ADD_DATA
    Regards

  • User Exit or BADI for VA02-Text editor Functionality

    Hi experts,
    Can anyone of you please provide me the User exit or BADI name for the tcode VA02 to call the Function Modules related to TEXT Editor?
    **********Issues********
    I have an Order eg.110022345...Under that Order,there are many line items...Say if i select one line item and change its Schedule line date,then that line item will get cancel and in turn an corresponding New line item will get ceated.
    However,the Content of the TEXT fields is not copied to the line item from the parent line item.
    I guess the STD SAP code functions in that way.So i thought of writting an Zcode to apply this functionality by using the Function modules "SAVE_TEXT" and "READ_TEXT_INLINE".
    In order to do this i need to know the User exit or BADI which is suitable for my requirment.
    Requesting you to help me in this case..
    Thanks in advans:)

    Hi
    Try USEREXIT_MOVE_FIELD_TO_VBAP in userexit MV45AFZZ.
    I'm not sure but may be you need to use FM 'CREATE_TEXT' instead of 'SAVE_TEXT'.
    First try with "SAVE_TEXT" if it won't work then use 'CREATE_TEXT'.
    Best Regards,
    Nikhil Patil

  • User exit to change Field labels( text) in VT01N

    Dear all,
    I have a requirement to change the Screen name of External ID1 ans External ID2 in identification tab to Seal and Trail. Is ther a user-exit to do this.
    useful answers will be rewarded
    Thanks
    J

    Hi
    Find the available exits with the following program:::
    *& Report  ZFINDUSEREXIT
    report  zfinduserexit.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir where pname = tstc-pgmna.
    select single * from enlfdir where funcname =
    tfdir-funcname.
    select single * from tadir where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct where sprsl eq sy-langu and
    tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    Execute the report, give the transaction you want to find user exit, and query( press f8 ).
    If  no appropriate exit is available you can go for badi's.
    To search for a badi, go to se 24 display <b>class cl_exithandler.</b>
    double click on method get_instance, get a break point on case statement.
    execute and start the required transaction in new session.
    look for variable <b>exit_name.</b> It would show the available badi's.
    Hope this helps
    <b>if it helped, you can acknowledge the same by rewarding</b>
    Regards
    Dinesh

  • Capture the Invoice Split Reason and update it in the invoice header text

    Hi All,
    We have a requirement where we need to capture the invoice split reason and update the reason in the one of the invoice header text.
    Problem is the routine where the split criteria is being determined is called a number of times, so how will we determine at what time of time do we need to capture the split reason. I mean at what iteration of the routine will we know that the split value is the right value.
    Is there any way to determine the number of iterations of a routine written for split?
    Require your valuable inputs for this issue....
    TIA
    Regards,
    Sharadendu

    Hi,
    Is your invoice split reason maintained in the header or item level?
    Try coding your logic in user exit MV45AFZZ and update header text using text id and save it in header text using
    FM [SAVE_TEXT|http://help.sap.com/saphelp_40b/helpdata/en/d6/0db8ef494511d182b70000e829fbfe/content.htm].
    Before this logic use FM [READ_TEXT|http://help.sap.com/saphelp_nw70/helpdata/en/d6/0db8c8494511d182b70000e829fbfe/content.htm] to determine if the header text is already updated. If yes,exit else save your HEADER_TEXT using SAVE_TEXT.
    This code can be written under FORM_USEREXIT_SAVE_DOCUMENT_PREPARE.
    Regards,
    Amit
    Edited by: Amit Iyer on Sep 1, 2009 8:46 PM

  • Need user exit to add body text in mail while saving the transaction VF02

    Hi All,
       Output type has been configured as external send(5) to trigger billing document as PDF. There is a requirment to add body text in the  mail along with pdf attachement. Funtional consultant has tried using NACE "Mail title and Text" but that doesn't worked out. As a abaper, we are trying to identfy the user exit where I can code the body of mail text.
    Can any body please let us know the user exit to add the body text only?
    Regards,
    Suresh Kumar.

    Hi,
    In your driver program you will have one standard include RVADOPFO.
    Copy all the code available in that include and make it to Z include.
    In this include function module ADDR_GET_NEXT_COMM_TYPE, will have the email address, subject etc.. details.
    So You can modify the contents of the imported parameters here.
    The above code will trigger only when update debugging is switched on!!!!!
    Regards,
    Santhosh.

  • 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

  • Any user exit to copy text from sales order to PR

    Hi,
    Any user exits or bapi to copy text from Sales order to Purchase requisitions.
    Jack

    Hi
    In SPRO , please use the menu path Materials Management - Purchasing - Purchase Requisition- Texts for Purchase Requisitions - Define copying rules
    Here  select the text and double click on Text linkages. There you can define the source text from sales order to the target text in PR.
    Please try and let me know if you still have any queries.
    Please reward points if this helps you
    Rgds

Maybe you are looking for

  • Using HTTPService to import data from a XML file

    Hello there! I'm having some problem's with this import... If anyone can help, I would appreciate it! I'm using this type of information as data source: public var dataCollection:ArrayCollection = new ArrayCollection([ { id: "P1", name: "Porto", type

  • Fit frame to content in rectangles in table cell

    I use this script: app.activeDocument.rectangles.everyItem().fit(FitOptions.frameToContent); It works, but not if the rectangle are inside a table cell. What can I do?

  • Clearing vendors/customer with S/L indicators

    Hi, I'm tring to clear two items (with S/L indicatrs) with difference. I would that the automatic item, in which is posted the difference, use the S/L indicator too. At the moment this not happened: the system use a different PK (without S/L indicato

  • Iphone 4 unable to connect to itunes 10.5. tried the step posted by apple support. running windows 7

    after uninstall and reinstall the itunes 10.5, my iphone 4 still cannot connect and use in itunes 10.5. Pc can retrieve pic in iphone but cannot access in itune 10.5. i have tried the step posted in apple support. please help~

  • Can't open links in Firefox or Safari

    In the past few months, I have lost the ability to click on some links in Safari and Firefox--all I get is a blank page.  Today I tried Internet Explorer and had no problem.  My older Mac has no problem with Safari or Firefox, but the Macbook (10.6.8