Uploading texts in vl02n transaction

Hi all,
can anyone tell me how to upload texts(in vlo2n transaction->goto->header->texts)
in vl02n transaction. plz send me some coding for this scenario.
Thanks,
Satish.

This is Routing long text upload - CA22 Transaction example code :
Report     : ZMPPC016
Type       : Data upload
Author     : Seshu Maramreddy
Date       : 05/27/2005
Transport  : DV3K920205
Transaction: ??
Description: This ABAP/4 Program Upload the long text into CA22
             Transaction It accepts tab-delimited spreadsheet input
             and it will run Call Transaction
report ZMPPC016
       no standard page heading
       line-size 120.
Constants
constants : c_r type c value 'R', " PLNTY Value
            C_X TYPE C VALUE 'X', " Value for dynbegin.
            c_tcode like tstc-tcode value 'CA22', " Transaction code
            c_mode(1) type c value 'A', " BDC Mode
            c_tdformat type tline-tdformat value '*',"Tag column
            c_tdid type thead-tdid value 'PLPO', " Text ID
            c_tdform type thead-tdform value 'SYSTEM'." Form name
Variables
data : v_date like sy-datum, " date
       v_date1(4) type c,
       v_date2(2) type c,
       v_date3(2) type c,
       TNAME LIKE THEAD-TDNAME,
       v_mandt(3) type c,
       v_matnr(18) type c,
       flag type c.
Internal table for file
data : begin of t_file occurs 0,
       matnr(18) type c, " Material Number
       werks(4) type c,  " Plant
       vornr(4) type c,  " Operation Number
       tseq(3) type n,   " Line number in the long text
       text1(70) type c, " Long text
       plnal(2) type n,  " Group counter
       end of t_file.
data : begin of t_text occurs 0,
       matnr(18) type c, " Material Number
       werks(4) type c,  " Plant
       plnal(2) type n,  " Group counter
       vornr(4) type c,  " Operation Number
       tseq(3) type n,   " Line number in the long text
       text1(70) type c, " Long text
       end of t_text.
Internal table for MAPl
data : begin of t_mapl occurs 0,
       plnnr like mapl-plnnr,
       end of t_mapl.
  Internal Table for PLAS and PLPO Table
data : begin of t_plpo occurs 0,
       mandt like plpo-mandt,
       plnty like plpo-plnty,
       plnnr like plpo-plnnr,
       plnkn like plpo-plnkn,
       zaehl like plpo-zaehl,
       end of t_plpo.
data t_long like tline occurs 0 with header line.
Work area for t_text Internal table
data : wa_text like t_text.
data:  t_header like thead.         " long text
Internal table for BDCDATA Structure
data : begin of itab_bdc_tab occurs 0.
        include structure bdcdata.
data : end of itab_bdc_tab.
Selection-screen
selection-screen : begin of block blk with frame .
parameter : P_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
  p_file = 'C:\My Documents\InputFile.txt'.
at selection-screen on value-request for p_file.
F4 value for file
  perform file_get.
start-of-selection.
Get file data into Internal Table.
  perform get_data.
  sort t_text by matnr werks  vornr  plnal tseq.
Save the long text into CA22 Transaction
  perform load_data.
top-of-page.
  CALL FUNCTION 'Z_HEADER'
EXPORTING
   FLEX_TEXT1       =
   FLEX_TEXT2       =
   FLEX_TEXT3       =
  skip 1.
*&      Form  file_get
      F4 Value for file
FORM file_get.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            DEF_PATH         = 'C:\Temp\'
            MASK             = ',.,..'
            MODE             = 'O'
            TITLE            = 'Select File'(007)
       IMPORTING
            FILENAME         = P_file
       EXCEPTIONS
            INV_WINSYS       = 1
            NO_BATCH         = 2
            SELECTION_CANCEL = 3
            SELECTION_ERROR  = 4
            OTHERS           = 5.
ENDFORM.                    " file_get
*&      Form  get_data
      Get file data into Internal Table.
FORM get_data.
  CALL FUNCTION 'WS_UPLOAD'
       EXPORTING
            FILENAME                = p_file
            FILETYPE                = 'DAT'
       TABLES
            DATA_TAB                = t_file
       EXCEPTIONS
            CONVERSION_ERROR        = 1
            FILE_OPEN_ERROR         = 2
            FILE_READ_ERROR         = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10.
  if sy-subrc eq 0.
    sort t_file by matnr werks plnal vornr tseq.
    delete t_file where matnr = ''.
    loop at t_file.
   Get the material number from tables ZMSMI_FERR_RAW,
   ZMSMI_SNAP_RAW and ZMSMI_SIMP_RAW
      perform get_matnr.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
           EXPORTING
                INPUT  = t_file-vornr
           IMPORTING
                OUTPUT = t_file-vornr.
      move : t_file-matnr to t_text-matnr,
             t_file-werks to t_text-werks,
             t_file-vornr to t_text-vornr,
             t_file-tseq  to t_text-tseq,
             t_file-text1 to t_text-text1,
             t_file-plnal to t_text-plnal.
      append t_text.
      clear t_text.
    endloop.
  else.
    WRITE: / 'Error reading input file'.
    stop.
  endif.
ENDFORM.                    " get_data
*&      Form  call_bdc
      BDC Script for CA22 Transaction
FORM call_bdc.
Screen 1010
  perform bdc_screen using  'SAPLCPDI'     '1010'.
  perform bdc_field  using  'BDC_OKCODE'   '=VOUE'.
  perform bdc_field  using  'RC27M-MATNR'   SPACE.
  perform bdc_field  using  'RC27M-WERKS'   SPACE.
  perform bdc_field  using  'RC271-VBELN'   SPACE.
  perform bdc_field  using  'RC271-POSNR'   SPACE.
  perform bdc_field  using  'RC271-PLNNR'   T_PLPO-PLNNR.
  perform bdc_field  using  'RC271-AENNR'   SPACE.
  clear :  v_date,
           v_date1,
           v_date2,
           v_date3.
  v_date1 = sy-datum+0(4).
  v_date2 = sy-datum+4(2).
  v_date3 = sy-datum+6(2).
  concatenate v_date2 v_date3 v_date1 into v_date.
  perform bdc_field  using  'RC271-STTAG'  v_date .
  perform bdc_field  using  'RC271-REVLV'   SPACE.
  perform bdc_field  using  'RC271-WERKS'   SPACE.
  perform bdc_field  using  'RC271-PLNAL'   WA_TEXT-PLNAL.
  perform bdc_field  using  'RC271-STATU'   SPACE.
  perform bdc_field  using  'RC271-VAGRP'   SPACE.
  perform bdc_field  using  'RC271-PROFIDNETZ'   SPACE.
Screen 5400
  perform bdc_screen using  'SAPLCPDI'     '5400'.
  perform bdc_field  using  'BDC_OKCODE'   '=OSEA'.
Screen 1010
  perform bdc_screen using  'SAPLCP02'     '1010'.
  perform bdc_field  using  'BDC_OKCODE'   '=ENT1'.
  perform bdc_field  using  'RC27H-VORNR'  WA_TEXT-VORNR.
Screen 5400
  perform bdc_screen using  'SAPLCPDI'     '5400'.
  perform bdc_field  using  'BDC_OKCODE'   '=LTXT'.
  perform bdc_field  using  'RC27X-FLG_SEL(01)'  C_X.
Screen 1100
  perform bdc_screen using  'SAPLSTXX'     '1100'.
  perform bdc_field  using  'BDC_OKCODE'   '=XEIN'.
Screen 0999
  perform bdc_screen using  'SAPLWB_CUSTOMIZING'     '0999'.
  perform bdc_field  using  'BDC_OKCODE'   '=CONT'.
  PERFORM BDC_FIELD  USING  'RSEUMOD-GRA_EDITOR' SPACE.
Screen 1100
  perform bdc_screen using  'SAPLSTXX'     '1100'.
  perform bdc_field  using  'BDC_CURSOR'   'RSTXT-TXPARGRAPH'.
  perform bdc_field  using  'BDC_OKCODE'   '=TXBA'.
  perform bdc_field  using  'RSTXT-TXPARGRAPH(03)'   '*'.
  perform bdc_field  using  'RSTXT-TXLINE(03)'
Screen 5400
  perform bdc_screen using  'SAPLCPDI'     '5400'.
  perform bdc_field  using  'BDC_OKCODE'   '=BU'.
  call transaction c_tcode
       using itab_bdc_tab mode 'N'
       update 'S'.
  refresh itab_bdc_tab.
  if sy-subrc eq 0 and sy-msgty ne 'E'.
    v_mandt = t_plpo-mandt.
    CONCATENATE v_mandt
                t_plpo-plnty
                t_plpo-plnnr
                t_plpo-plnkn
                t_plpo-zaehl into tname.
    commit work.
    CALL FUNCTION 'DELETE_TEXT'
      EXPORTING
      CLIENT                  = SY-MANDT
        ID                    = c_tdid
        LANGUAGE              = 'E'
        NAME                  =  TNAME
        OBJECT                = 'ROUTING'
        SAVEMODE_DIRECT       = 'X'
     TEXTMEMORY_ONLY       = ' '
     LOCAL_CAT             = ' '
     EXCEPTIONS
       NOT_FOUND             = 1
       OTHERS                = 2
    if sy-subrc ne 0.
      write:/3  wa_text-matnr,24 wa_text-werks,
                30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                60 ' -',
                67 'Error Deleting Existing Long Text'.
    endif.
  else.
    write:/3  wa_text-matnr,24 wa_text-werks,
                   30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                   60 ' -',
                   67 'Error Executing BDC'.
  endif.
ENDFORM.                    " call_bdc
*&      Form  bdc_screen
      BDC Script for Screen fields
     -->P_PROG   Program name
     -->P_SCRN   Screen Number
FORM bdc_screen USING    p_prog
                         p_scrn.
  clear itab_bdc_tab.
  itab_bdc_tab-program = p_prog.
  itab_bdc_tab-dynpro = p_scrn.
  itab_bdc_tab-dynbegin = c_x.
  append itab_bdc_tab.
ENDFORM.                    " bdc_screen
*&      Form  bdc_field
      BDC Script for Screen fileds
     -->P_NAM   Field name
     -->P_VAL   Field value
FORM bdc_field USING    p_nam
                        p_val.
  clear itab_bdc_tab.
  itab_bdc_tab-fnam = p_nam.
  itab_bdc_tab-fval = p_val.
  append itab_bdc_tab.
ENDFORM.                    " bdc_screen
*&      Form  load_data
      Save the long text into CA22 Transaction
FORM load_data.
  loop at t_text.
    move t_text to wa_text.
    at new vornr.
Read the data in MAPL Table
      select single plnnr from mapl into t_mapl-plnnr
                             where matnr  = wa_text-matnr
                             and   werks  = wa_text-werks
                             and   plnty  = c_r
                             and   loekz  = space.
      if sy-subrc eq 0.
Read the data from PLAS and PLPO Table
        select SINGLE  a~mandt
                a~plnty
                a~plnnr
                a~plnkn
                a~zaehl into  t_plpo
               from plpo as a inner join plas as b on aplnty = bplnty
                                                  and aplnnr = bplnnr
                                                  and aplnkn = bplnkn
                where b~plnty = c_r
                and   b~plnnr = t_mapl-plnnr
                and   b~plnal = wa_text-plnal
                and   b~loekz = space
                and   a~vornr = wa_text-vornr
                and   a~loekz = space.
        if sy-subrc eq 0.
          perform call_bdc.
        else.
        flag = 'X'.
          write:/3  wa_text-matnr,24 wa_text-werks,
                 30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                 60 ' -',
                 67 'Matching routing group\Operation not found'.
          continue.
        endif.
      else.
        flag = 'X'.
        write:/3 wa_text-matnr,24 wa_text-werks,
                 40 ' -',
                 45 'Material Does not Exists or Material',
                 82 'not Available in MAPL Table'.
        continue.
      endif.
    endat.
    if flag ne 'X'.
      t_long-tdline = wa_text-text1.
      t_long-tdformat = c_tdformat.
      append t_long.
    endif.
    at end of vornr.
      if flag ne 'X'.
        v_mandt = t_plpo-mandt.
        CONCATENATE v_mandt
                  t_plpo-plnty
                  t_plpo-plnnr
                  t_plpo-plnkn
                  t_plpo-zaehl into tname.
        T_HEADer-TDOBJECT = 'ROUTING'.
        t_HEADer-TDNAME   = tname.
        T_HEADer-TDID     = c_tdid.
        t_header-tdform   = c_tdform.
        T_HEADer-TDSPRAS  = 'E'.
Save the text
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            CLIENT                = SY-MANDT
            HEADER                = t_header
            SAVEMODE_DIRECT       = 'X'
     OWNER_SPECIFIED       = ' '
     LOCAL_CAT             = ' '
   IMPORTING
     FUNCTION              =
     NEWHEADER             =
          TABLES
            LINES                 = t_long
         EXCEPTIONS
           ID                    = 1
           LANGUAGE              = 2
           NAME                  = 3
           OBJECT                = 4
           OTHERS                = 5
        if sy-subrc eq 0.
          CALL FUNCTION 'COMMIT_TEXT'
               EXPORTING
                    OBJECT   = t_header-TDOBJECT
                    NAME     = t_header-TDNAME
                    ID       = t_header-TDID
                    LANGUAGE = t_header-TDSPRAS.
          write:/3   wa_text-matnr,24 wa_text-werks,
                     30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                     60 ' -',
                     67 'Long Text Loaded Successfully'.
        else.
          write:/3   wa_text-matnr,24 wa_text-werks,
                     30 t_mapl-plnnr,44 wa_text-plnal,48 wa_text-vornr,
                     60 ' -',
                     67 'Error Uploading Long Text'.
        endif.
        refresh t_long.
        else.
        write:/3 wa_text-matnr, 24 wa_text-werks,
               45 'Long text not uploaded'.
        clear flag.
       endif.
      endat.
    endloop.
  ENDFORM.                    " load_data
*&      Form  get_matnr
      Get the material number from tables ZMSMI_FERR_RAW,
FORM get_matnr.
  clear v_matnr.
  case t_file-werks.
    when '0101'.
      select single cmatnr from zmsmi_simp_raw
             into v_matnr  where matnr = t_file-matnr.
     if sy-subrc eq 0.
      if not v_matnr is initial.
        clear t_file-matnr.
        t_file-matnr = v_matnr.
      endif.
    when '0103'.
      select single cmatnr from zmsmi_ferr_raw
             into v_matnr  where matnr = t_file-matnr.
     if sy-subrc eq 0.
      if not v_matnr is initial.
        clear t_file-matnr.
        t_file-matnr = v_matnr.
      endif.
    when '0102' or '0110' or '0111' or '0112' or '0113'
         or '0114' or '0115' or '0116' or '0117'.
      select single cmatnr from zmsmi_snap_raw
             into v_matnr  where matnr = t_file-matnr.
     if sy-subrc eq 0.
      if not v_matnr is initial.
        clear t_file-matnr.
        t_file-matnr = v_matnr.
      endif.
  endcase.
ENDFORM.                    " get_matnr
Reward points if it is useful
Thanks
Seshu

Similar Messages

  • Upload text in SAP Routings CA01 Transaction

    I tried to upload Long Text in CA02 Transaction in the Opertions Tab using SAVE_TEXT.
    Sy-subrc return 0.
    when I check in transaction, it is not showing text.
    If I use read_text , then it returning the text that i have upload.
    Surprised by the way it worked.

    Hi
    Please check whether the below fields are being passed to the SAVE_TEXT FM.
    Text Name       100N        0100000001
    Language        EN
    Text ID         PLKO Long Text
    Text Object     ROUTING    Texts for task list types
    Check whether these fields are being passed to HEADER
    and alsomake sure that  savemode_direct = 'X'
    Shiva

  • Reg: Header text updation in VL02n transaction

    Hi Experts,
    i have one requirement in return delivery.
    I am executing one customizing trasaction, and it displays screen.
    In that screen i am editing the fileds and when i click on the save button i need to update in delivery transaction header texts (VL02n transaction goto header texts).

    Hi,
    Use the SAVE-TEXT FM as below.
      CALL FUNCTION 'SAVE_TEXT'
           EXPORTING
                HEADER    = LS_THEAD
           IMPORTING
                NEWHEADER = LS_THEAD
           TABLES
                LINES     = TLINETAB
           EXCEPTIONS
                ID        = 1
                LANGUAGE  = 2
                NAME      = 3
                OBJECT    = 4
                OTHERS    = 5.
      IF SY-SUBRC = 0.
    Where LS_THEAD, CONTAINS:
                                            TDOBJECT                                             VBBK
                                            TDNAME                                             00999999(Your delivery no)
                                            TDID                                                         Z950
                                            TDSPRAS                                             E.
    You can find this details, when you go to the transaction(VL02N) and enter some text and do the debug on  SAVE_TEXT FM, then get the values it uses to save the text, use the same in you program.
    Hope this helps,
    Cheers,
    Srini.

  • Upload longtext in QP01 transaction ?

    Hi All,
    I need to upload long text in qp01 transaction...can anyone tel me how to do it.....both the long text and other data has to be uploaded in a single program or ..... ? can you people tel the procedures involved ?
    thanks,
    Siva

    BDC - Creating Inspections Plans using T-Code QP01
    cheers
    Aveek

  • V v urgent ...  how to get the selected rows in the vl02n transaction

    Hi ,
    I have requirement that i have selected the line items in the vl02n transaction.
    If I select only one row there is option gs_get_cursor-line.
    If I select more than one line item at a time I am getting only the last value in to gs_get_cursor-line.
    Can anybody let me know how to get the multiple line items  that are selected
    It is very urgent ..
    Plz Help

    Hi,
    can you check the E_row_id .
    v_row type LVC_S_ROW
    read table itab index E_ROW-index.
    regards,
    Ajay
    Edited by: Ajay on Feb 14, 2008 6:22 PM

  • Upload text file to oracle table with checking and aggregation

    Hi Friends,
    I am new to ODI.  I have encountered a problem which is specific to ODI 11G (11.1.1.6.3) to upload text file to oracle table with checking and aggregation.  Would you please teach me how to implement the following requirement in ODI 11G?
    Input text file a:
    staffCode, staffCat, status, data
    input text file b:
    staffCodeStart, staffCodeEnd, staffCat
    temp output oracle table c:
    staffCat, data
    output oracle table d:
    staffCat, data
    order:
    a.staffCode, a.staffCat, a.status
    filter:
    a.status = ‘active’
    join:
    a left outerjoin b on a.staffCode between b.staffCodeStart and b.staffCodeEnd
    insert temp table c:
    c.staffCat = if b.staffCat is not null then b.staffCat else a.staffCat
    c.data = a.data
    insert table d:
    if c.staffCat between 99 and 1000 then d.staffCat = c.staffCat, d.data = sum(c.data)
    else d.staffCat = c.staffCat, d.data = LAST(c.data)
    Any help on fixing this is highly appreciated. Thanks!!
    Thanks,
    Chris

    Dear Santy,
    Many thanks for your prompt reply.  May I have more information about the LAST or SUM step?
    I was successful to create and run the following interfaces p and q
    1. Drag text file a to a newly created interface panel p
    2. Filter text file a : a.status = ‘active’
    3. Lookup text file a to text file b : a.staffCode between b.staffCodeStart and b.staffCodeEnd
    4. Drag oracle temp table c to interface panel p
    5. Set c.staffCat : CASE WHEN b.staffCat IS NULL THEN a.staffCat ELSE b.staffCat END
    6. Set c.data : a.data
    7. Drag oracle temp table c to a newly created interface panel q
    8. Drag oracle table d to interface panel q
    9. Set UK to d.staffCat
    10. Set Distinct Rows to table d
    11. Set d.staffCat = c.staffCat
    12. Set d.data = SUM(c.data)
    However, the interface q should be more than that:
    If c.staffCat is between 99 and 1000, then d.data = the last record c.data; else d.data = sum(c.data)
    Would you please teach me how to do the LAST or SUM steps?  Moreover, can interface p and interface q be combined to one interface and do not use the temp table c?  Millions thanks!
    Regards,
    Chris

  • Upload text files with non-english characters

    I use an Apex page to upload text files. Then i retrieve the contents of files from wwv_flow_files.blob_content and convert them to varchar2 with utl_raw.cast_to_varchar2, but characters like ò, à, ù become garbage.
    What could be the problem? Are characters lost when files are stored in wwv_flow_files or when i do the conversion?
    Some other info:
    * I see wwv_flow_files.DAD_CHARSET is set to "ascii", wwv_flow_files.FILE_CHARSET is null.
    * Trying utl_raw.cast_to_varchar2( utl_raw.cast_to_raw('àòèù') ) returns 'àòèù' correctly;
    * NLS_CHARACTERSET parameter is AL32UTF8 (not just english ASCII)

    Hi
    Have a look at csv upload -- suggestion needed with non-English character in csv file it might help you.
    Thanks,
    Manish

  • In Bdc I have huge volume of data to upload for the given transaction

    Hi gurus,
    In Bdc I have huge volume of data to upload for the given transaction, here am using session method, it takes lots of exection time to complete the whole transaction, Is there any other method to process the huge volume with minimum time,
    reward awaiting
    with regards
    Thambe

    Selection of BDC Method depends on the type of the requirement you have. But you can decide which one will suite requirement basing the difference between the two methods. The following are the differences between Session & Call Transaction.
    Session method.
    1) synchronous processing.
    2) can tranfer large amount of data.
    3) processing is slower.
    4) error log is created
    5) data is not updated until session is processed.
    Call transaction.
    1) asynchronous processing
    2) can transfer small amount of data
    3) processing is faster.
    4) errors need to be handled explicitly
    5) data is updated automatically
    Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is
    not bi-directional.
    BDC works on the principle of simulating user input for transactional screen, via an ABAP program.
    Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.
    In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in
    Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.
    Batch Input (BI) programs still use the classical BDC approach but doesn’t require an ABAP program to be written to format the BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and invokes the transaction mentioned in the header record of the file.
    Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are not available for all application areas.
    synchronous & Asynchronous updating:
    http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/keyConcepts4.html
    synchronous & Asynchronous processings
    Asynchronous refers to processes that do not depend on each other's outcome, and can therefore occur on different threads simultaneously. The opposite is synchronous. Synchronous processes wait for one to complete before the next begins. For those Group Policy settings for which both types of processes are available as options, you choose between the faster asynchronous or the safer, more predictable synchronous processing.
    By default, the processing of Group Policy is synchronous. Computer policy is completed before the CTRLALTDEL dialog box is presented, and user policy is completed before the shell is active and available for the user to interact with it.
    Note
    You can change this default behavior by using a policy setting for each so that processing is asynchronous. This is not recommended unless there are compelling performance reasons. To provide the most reliable operation, leave the processing as synchronous.

  • User exit/BADi to change the header text in MIRO transaction

    Hi all,
    I am searching user exit or badi to change the header text in MIRO transaction.
    My requirement is, before post the invoice I need to populate the vendor name in Header text field(MIRO -> Details tab -> header text field ). I have tried all the user exits and BADi's related to MIRO. Doesn't work. If anybody knows please share.
    Thanks,
    Pranav

    Try BADI INVOICE_UPDATE.
    If you are in system version is ECC 6.0, you can find out a Enhancement SPOT (ES_SAPLMRMC) under Function module MRM_FINAL_CHECK, which can be used to perform this requirement
    Hope this helps.
    Thanks,
    Balaji
    Edited by: Balaji Ganapathiraman on Mar 14, 2008 4:43 PM

  • User exit/BADi to populate the header text in MIRO transaction

    Hi all,
    I am searching user exit or badi to populate the header text in MIRO transaction.
    My requirement is, before post the invoice I need to populate the some text in Header text field (MIRO -> Details tab -> header text field). I need to populate this field in the MM document as well as FI document (Accounting Document). I have tried all the user exits and BADi's related to MIRO/MRRL. Doesn't work. If anybody knows please share.
    Thanks,
    Santosh
    Edited by: Santosh Ghonasgi on May 13, 2010 4:48 PM

    Hello santosh,
    I am not sure whether a suitable exit / BADI exists to update the header text in MIRO directly.
    there is one related forum:
    User exit/BADi to change the header text in MIRO transaction
    Hope, it may helpful for you to proceed with some other parallel solution.
    Regards,
    Selva K.
    Edited by: Selvakumar Krishnan on May 13, 2010 5:29 PM

  • Long Text of VD53 Transaction

    Hi experts
           How to get long text in VD53 transaction Using READ_TEXT
    Regards
    Manoj

    the text name is i got for my sales org and mat no. is this
    TEXT NAME : SP01010031970211000000000011000112
    I guesss this is combination of
    text name =  SALES ORG + Distribution Channel+ customer no + material no.
    Text id = customer material no.
    Text Object = KNMT
    You need to pass this to ur READ_TEXT module.

  • Read Header Text  From VF03 Transaction

    Hi Frds,
                  I want to Read Header Text  From VF03 Transaction
    Read Transport Number and Transport Date From Vf03 Transaction.
    Guide Me Briefly
    How to pass the varaibles to the function Module
    Regards,
    Kabil

    hi Kabil ,
        Your issue completely accepted just keep in mind
    1) if you have to read both text you have to use read_text 2 times
    2) in that for first read_text
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
          CLIENT                =       SY-MANDT
           ID                       =       '0002'
           LANGUAGE        =       SY-LANGU
           NAME                =        '             '          "" YOUR VARIABLE THAT CONTAINS Invoices number
           OBJECT             =        'VBRK'
          TABLES
           LINES                =         TLINE
       IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF. 
        is ok for Header note 1 .(means first text ) but for second text your ID is change other thing is same .
    CALL FUNCTION 'READ_TEXT'
         EXPORTING
          CLIENT                =       SY-MANDT
           ID                       =       '0013'
           LANGUAGE        =       SY-LANGU
           NAME                =        '             '          "" YOUR VARIABLE THAT CONTAINS Invoices number
           OBJECT             =        'VBRK'
          TABLES
           LINES                =         TLINE
       IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
    Hope this will help you
    Thanking You,
    shrikant padwale.

  • Uploaded text file has a new line added at the top using BSP MVC applicatio

    I have a BSP MVC application that uploads data on to the application server. When I open the uploaded text file, the very first line on the file looks like the line below. ->
    htmlb:button:click:nullhtmlb_form_1UploadUpload0htmlbdfsdf
    But the rest of the file looks okay. This is causing other than .txt files to get corrupted.
    Here is the code from my DO_HANDLE_EVENT.
    data: entity   type ref to if_http_entity,
          name     type string,
          content  type xstring,
          content_type type string,
          idx      type i value 1,
          v_root(26) value '
    houappl131\SRM_Download\',
          v_unxfile(100),
          v_transfer type xstring,
          v_type(6),
          v_len type i,
          v_dirfile type zfileinfo,
          v_ofile(80),
          v_guid type guid_32.
      class cl_htmlb_manager definition load.
      data:        v_asn(10) type n.
      data: fu        type ref to cl_htmlb_fileupload,
                       file_id   type string value 'batchfile'.
      data: o_page_context type ref to if_bsp_page_context.
      data: parent type ref to cl_bsp_controller2,
            lo_model                       type ref to cl_sus_m_asn_detail.
      o_page_context = me->get_page_context( ).
      cl_htmlb_manager=>dispatch_event_ex( request = request
      page_context = o_page_context
      event_handler = me ).
      refresh z_batch->message.
      if htmlb_event->server_event = 'Upload'.
        fu ?= cl_htmlb_manager=>get_data( request = request id = file_id name
                                             = 'fileUpload' ).
        if fu->file_name gt space.
              z_batch->parameters-fpath = fu->file_name.
              v_len = strlen( z_batch->parameters-fpath ).
              if v_len gt 4.
                v_len = v_len - 3.
              endif.
              v_type = z_batch->parameters-fpath+v_len(3).
              search z_batch->parameters-fpath for '.'.
              if sy-fdpos gt 0 and v_len gt 0.
                v_len = v_len - sy-fdpos.
                v_type = z_batch->parameters-fpath+sy-fdpos(v_len).
              endif.
              clear v_asn.
              v_asn = z_batch->parameters-asnhdr.
              concatenate v_asn
                          z_batch->parameters-asnitem
                          z_batch->parameters-batch
                          v_type
                          into v_unxfile separated by '.'.
              concatenate v_root v_unxfile into v_unxfile.
              condense v_unxfile no-gaps.
              open dataset v_unxfile for output in binary mode.
                while idx <= request->num_multiparts( ).
                  entity = request->get_multipart( idx ).
                  name = fu->file_name .
                  if name is not initial.
                    content_type = entity->get_header_field( 'Content-Type' ).
                    clear content.
                    content      = entity->get_data( ).
                    v_transfer = content.
                    transfer content to v_unxfile.
                    append content to z_batch->filetab.
                  endif.
                  idx = idx + 1.
                endwhile.
                close dataset v_unxfile.
            endif.
      endif.
    Here is my fileupload button in the view
    <htmlb:page title="File Upload " >
        <htmlb:form method       = "post"
                    encodingType = "multipart/form-data" >
          <htmlb:label id     = "Batchnum"
                       design = "Label"
                       for    = "Batchnumber"
                       text   = "Batch" />
          <htmlb:inputField id    = "Batchinput"
                            value = "//zbatch/parameters.batch" />
          <htmlb:fileUpload id="batchfile" />
          <htmlb:button id      = "Upload"
                        text    = "Upload"
                        onClick = "Upload" />
          <htmlb:button id      = "Close"
                        text    = "Close window"
                        onClick = "Close" />
    Any of you gurus know why this is happening?

    I solved it myself

  • Error while doing PGI from VL02n Transaction.

    Hi..
    I am doing PGI from VL02n transaction and getting the following error. "Plant conversion Failed".
    Any idea what might be wrong.
    Thanks and apprecite ur help.

    PGI is the simplest BDC you can ever write. If you are getting this error, there must be something wrong with the data. Try doing the transaction call online in debug mode and see where the error comes from. You can then identify what needs to be done.

  • Upload text in cutomer master

    hi!
    i have falt file with two columns customer number and text.
    customer numbers are already uploaded into the (table) sap,
    i need to upload text by READ_TEXT and SAVE_TEXT in VA02,
    can anybody sent me the sample program for it?
    regards
    anjali

    Hi Anjali
    Please let me know, which text in VA02 you need to load the data.
    We are having header text and item text.
    You can do the same in the following way.
    Go to the sales order -> go to header -> texts
    Choose the text to change.
    Double click in the long text area
    and than go to header
    Note down the following details
    Text Name - ( TDNAME )
    Language  - ( TDSPRAS )
    Text ID   - ( TDID)
    Text object - ( TDOBJECT )
    <b>To update the sales order text, you require the sales order number</b>
    Than you can write the program and use the function module
    SAVE_TEXT
    In this function module -
    In the  Header import parameter, pass the above parameters which you have noted down.
    In the table parameter ( lines ), pass the actual text.
    I hope this will work
    Regards
    MD

Maybe you are looking for