Skip to Content
author's profile photo Former Member
Former Member

Example of Conversion exit

Hi all,

Can anyone send me a example having 'CONVERSION_EXIT_ALPHA_INPUT'

and 'CONVERSION_EXIT_ALPHA_OUTPUT' functions.So i can understnad how to use it.

Regards,

Swati garg

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    Posted on Jun 26, 2007 at 05:29 AM
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  input  = is_final-anln1
             IMPORTING
                  output = is_final-anln1.
    

    The value of is_final-anln1 before calling the FM is : 101

    The value of is_final-anln1 after calling the FM is : 000000000101 (add leading Zeros)

    Its the reverse in case of the 'CONVERSION_EXIT_ALPHA_OUTPUT' will remove the leading zeros

    Regards

    Gopi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      i want to know on which basis its adding the zeros.it always make it 8 character by adding zeros or something else.

      Actually my problem is ..

      if i paas 189 for matnr field then it will convert in '000000000000000018' which is 18 character .and for ebeln if i paas 10 then it will give'0000000010' which is 10 character long.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 26, 2007 at 05:30 AM

    Hi,

    check this example

    
    DATA: V_CHAR(10).
    
    V_CHAR = '9999'.
    
    * This function module will put leading zeroes..
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
          INPUT = V_CHAR
      IMPORTING
          OUTPUT = V_CHAR.
    
    write: / v_char.
    
    * This function module will remove leading zeroes..
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
          INPUT = V_CHAR
      IMPORTING
          OUTPUT = V_CHAR.
    
    write: / v_char.
    

    Thanks

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 26, 2007 at 05:32 AM

    Hi,

    Here the Docu of the FM:

    FU CONVERSION_EXIT_ALPHA_INPUT

    ____________________________________________________

    Short text

    Conversion exit ALPHA, external->internal

    ALPHA conversion is used especially with account numbers. During conversion from the external to the internal format, the system checks to see if input in the INPUT field is purely numeric, that is, if this input consists only of numbers, possibly with spaces before and after them. If this is the case, then the number string is inserted right- justified in the display field OUTPUT and all spaces to the left of the value are filled with zeroes ('0'). If the input is not purely numeric, it is inserted in the display field from left to right and all extra spaces are filled with blanks.

    Example:

    (Input field and output field are both eight characters in length)

    1. '1234 ' --> '00001234'

    2. 'ABCD ' --> 'ABCD '

    3. ' 1234 ' --> '00001234'

    Conversion from the internal to the external format (function module CONVERSION_EXIT_ALPHA_OUTPUT) is undertaken in exactly the opposite manner.

    Parameter

    INPUT

    OUTPUT

    Exceptions

    Function group

    ALFA

    short example:

    REPORT ZGRO_TEST. .

    *

    DATA: c1(18) value '123'.

    DATA: c2(18).

    *

    write: / c1.

    *

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    INPUT = C1

    IMPORTING

    OUTPUT = C2.

    *

    write: / c2.

    Hope it helps.

    This is an conversion FM. Used mainly when dealing with select queries.

    Because what appears on screen is not the way it is stored in databases. There will be a conversion routine.

    So if we are reading directly from tables, we have to use the conversion exits.

    Generally these are provided with the data element defintion you are dealing with.

    2)CONVERSION_EXIT_ALPHA_OUTPUT

    CONVERSION_EXIT_MATN1_OUTPUT suppress the leading zeroes only if the material number is numeric.

    <b>SHIFT MATNR LEFT DELETING LEADING ' 0'</b>

    <b>Reward points</b>

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 26, 2007 at 05:33 AM

    Hi,

    DATA: lv_var(8).

    lv_var= '2222'.

    <b>This function module will put leading zeroes</b>

    "2222->00002222"

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

    EXPORTING

    INPUT = lv_var

    IMPORTING

    OUTPUT = lv_var.

    <b>This function module will remove leading zeroes</b>

    "00002222->2222"

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    INPUT = lv_var

    IMPORTING

    OUTPUT = lv_var.

    Regards,

    Ranjit Thakur.

    <b>Please Mark The Helpful Answer.</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 26, 2007 at 05:36 AM

    hi

    good

    CONVERSION_EXIT_ALPHA_INPUT converts any number into a string fill with zeroes, with the number at the extreme right

    Example:

    input = 123

    output = 0000000000000...000000000000123

    thanks

    mrutyun^

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 26, 2007 at 05:41 AM

    Hi Swathi,

    I f you go through this report you can get to know the usage of the conversion exit for the asset number field (anln1) in table ANLA.

    &----


    *& Report ZASSET_MASTER *

    *& *

    &----


    *& Purpose : Report to display the master details of Assets

    &----


    REPORT zasset_master LINE-SIZE 1023

    NO STANDARD PAGE HEADING.

    TABLES: anla, anlz, zasset_master, zasset_transfer.

    TYPE-POOLS: slis.

    DATA : fieldcat TYPE slis_fieldcat_alv, " FIELD CATOLOG

    fieldcat_t TYPE slis_t_fieldcat_alv, " FIELD CATOLOG

    pos TYPE sy-tabix, " POSITION FOR FIELDCAT

    name TYPE sy-repid, " NAME OF THE REPORT

    sort TYPE slis_sortinfo_alv, " SORTING ITAB

    sort_t TYPE slis_t_sortinfo_alv, " SORTING ITAB

    top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',

    user_command TYPE slis_formname VALUE 'USER_COMMAND'.

    DATA : BEGIN OF it_main OCCURS 0,

    bukrs TYPE anla-bukrs, " Company Code

    anln1 TYPE anla-anln1, " Asset Number

    txt50 TYPE anla-txt50, " Asset Description

    anlkl TYPE anla-anlkl, " Asset Class

    ktogr TYPE anla-ktogr, " Account Determination

    aktiv TYPE anla-aktiv, " Capitalization Date

    ord41 TYPE anla-ord41, " Evaluation Group1

    ord42 TYPE anla-ord42, " Evaluation Group2

    lifnr TYPE anla-lifnr, " Vendor Code

    menge TYPE anla-menge, " Quantity

    meins TYPE anla-meins, " Unit of measure

    invnr TYPE anla-invnr, " Inventory No.

    sernr TYPE anla-sernr, " Serial No.

    ernam TYPE anla-ernam, " Created By

    erdat TYPE anla-erdat, " Created Date

    aenam TYPE anla-aenam, " Changed By

    aedat TYPE anla-aedat, " Changed Date

    gsber TYPE anlz-gsber, " Business Area

    kostl TYPE anlz-kostl, " Cost Center

    bondno TYPE zasset_master-bondno, " Master Bond No.

    boeno TYPE zasset_master-boeno, " Bill of Entry No.

    grnno TYPE zasset_master-grnno, " GR No.

    zeile TYPE zasset_master-zeile, " GR Line Item No.

    pono TYPE zasset_master-pono, " PO No.

    prno TYPE zasset_master-prno, " PO No.

    currplant TYPE zasset_transfer-currplant, " Curr Plant

    currloc TYPE zasset_transfer-currloc, " Curr Location

    currseatid TYPE zasset_transfer-currseatid, " Curr seatID

    curruser TYPE zasset_transfer-curruser, " Current UserID

    sbondno TYPE zasset_transfer-sbondno, " Shift Bond No.

    transferdate TYPE zasset_transfer-transferdate," Transfer Date

    anlgr TYPE anlb-anlgr, " Group Asset

    END OF it_main.

    DATA: it_anlz TYPE anlz OCCURS 0 WITH HEADER LINE,

    it_zasset_transfer TYPE zasset_transfer OCCURS 0 WITH HEADER LINE,

    wa_zasset_master TYPE zasset_master.

    DATA: asset_no TYPE zasset_master-assetno.

    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.

    SELECT-OPTIONS : s_anln1 FOR anla-anln1,

    s_anlkl FOR anla-anlkl,

    s_bukrs FOR anla-bukrs,

    s_gsber FOR anlz-gsber NO INTERVALS NO-EXTENSION,

    s_kostl FOR anlz-kostl NO INTERVALS NO-EXTENSION,

    s_bondno FOR zasset_master-bondno NO INTERVALS

    NO-EXTENSION,

    s_boeno FOR zasset_master-bondno NO INTERVALS

    NO-EXTENSION,

    s_plant FOR zasset_transfer-currplant NO INTERVALS

    NO-EXTENSION,

    s_loc FOR zasset_transfer-currloc NO INTERVALS

    NO-EXTENSION,

    s_seat FOR zasset_transfer-currseatid,

    s_user FOR zasset_transfer-curruser NO INTERVALS

    NO-EXTENSION,

    s_ord41 FOR anla-ord41 NO INTERVALS NO-EXTENSION,

    s_ord42 FOR anla-ord42 NO INTERVALS NO-EXTENSION,

    s_lifnr FOR anla-lifnr,

    s_ernam FOR anla-ernam NO INTERVALS NO-EXTENSION,

    s_erdat FOR anla-erdat,

    s_aenam FOR anla-aenam NO INTERVALS NO-EXTENSION,

    s_aedat FOR anla-aedat.

    SELECTION-SCREEN END OF BLOCK block1.

    START-OF-SELECTION.

    SELECT * FROM anla INTO CORRESPONDING FIELDS OF TABLE it_main

    WHERE bukrs IN s_bukrs

    AND anln1 IN s_anln1

    AND anlkl IN s_anlkl

    AND ord41 IN s_ord41

    AND ord42 IN s_ord42

    AND lifnr IN s_lifnr

    AND ernam IN s_ernam

    AND erdat IN s_erdat

    AND aenam IN s_aenam

    AND aedat IN s_aedat.

    LOOP AT it_main.

    select single anlgr from anlb into it_main-anlgr

    where anln1 eq it_main-anln1.

    SELECT * FROM anlz INTO TABLE it_anlz

    WHERE anln1 EQ it_main-anln1.

    SORT it_anlz DESCENDING BY adatu.

    READ TABLE it_anlz INDEX 1.

    IF it_anlz-gsber IN s_gsber AND it_anlz-kostl IN s_kostl

    AND it_anlz-werks IN s_plant AND it_anlz-stort IN s_loc

    AND it_anlz-raumn IN s_seat AND it_anlz-pernr IN s_user.

    MOVE : it_anlz-gsber TO it_main-gsber,

    it_anlz-kostl TO it_main-kostl,

    it_anlz-werks TO it_main-currplant,

    it_anlz-stort TO it_main-currloc,

    it_anlz-raumn TO it_main-currseatid,

    it_anlz-pernr TO it_main-curruser.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    input = it_main-anln1

    IMPORTING

    output = asset_no.

    SELECT SINGLE pbondno pboeno pgrnno pzeile ppono pprno

    fsbondno ftransferdate

    INTO CORRESPONDING FIELDS OF it_main

    FROM ( zasset_master AS p INNER JOIN

    zasset_transfer AS f ON passetno = fassetno )

    WHERE p~assetno EQ asset_no

    AND f~transferdate EQ it_anlz-adatu.

    IF it_main-bondno in s_bondno and it_main-boeno in s_boeno.

    MODIFY it_main.

    ELSE.

    DELETE it_main WHERE anln1 EQ it_anlz-anln1.

    ENDIF.

    ELSE.

    DELETE it_main WHERE anln1 EQ it_anlz-anln1.

    ENDIF.

    clear : asset_no, it_anlz.

    refresh : it_anlz.

    endloop.

    SORT it_main BY anln1.

    CLEAR : fieldcat_t,pos.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ANLN1'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Asset No'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'TXT50'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Asset Description'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ANLKL'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Asset Class'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'MENGE'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Quantity'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'MEINS'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Unit'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ORD41'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Evaluation Group1'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ORD42'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Evaluation Group2'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'INVNR'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Inventory No.'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'SERNR'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Serial No'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'BONDNO'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Master Bond No'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'SBONDNO'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Shift Bond No'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'BOENO'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Bill of Entry No'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'AKTIV'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Capitalization Date'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ANLGR'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Group Asset'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'CURRPLANT'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Plant'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'CURRLOC'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Location'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'CURRSEATID'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Seat ID'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'CURRUSER'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Employee ID'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'BUKRS'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Company Code'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'GSBER'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Business Area'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'KOSTL'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Cost Center'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'LIFNR'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Vendor'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'PRNO'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Purchase Requisition'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'PONO'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Purchase Order'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'GRNNO'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Goods Receipt Note'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ZEILE'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'GR Line Item No'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    fieldcat-no_zero = 'X'.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ERNAM'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Created By'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'ERDAT'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Created Date'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'AENAM'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Changed By'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'AEDAT'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Changed Date'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CLEAR fieldcat.

    fieldcat-fieldname = 'TRANSFERDATE'.

    fieldcat-tabname = 'IT_MAIN'.

    fieldcat-seltext_l = 'Last Transfer Date'.

    fieldcat-just = 'L'.

    fieldcat-col_pos = pos.

    pos = pos + 1.

    APPEND fieldcat TO fieldcat_t.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = sy-repid

    • i_callback_top_of_page =

    • i_callback_pf_status_set = pf_status_set

    i_callback_user_command = user_command

    i_grid_title = 'Asset Master Details'

    • is_layout = layout

    it_fieldcat = fieldcat_t

    it_sort = sort_t

    TABLES

    t_outtab = it_main.

    &----


    *& Form USERCOMMAND

    &----


    FORM user_command USING ucomm LIKE sy-ucomm

    selfield TYPE slis_selfield.

    CASE ucomm.

    WHEN '&IC1'.

    READ TABLE it_main INDEX selfield-tabindex.

    SET PARAMETER ID 'AN1' FIELD it_main-anln1.

    SET PARAMETER ID 'BUK' FIELD it_main-bukrs.

    CALL TRANSACTION 'AS03' AND SKIP FIRST SCREEN.

    ENDCASE.

    ENDFORM. "user_command3

    Reward points if the example is useful.

    Regards,

    Radhu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2016 at 12:56 PM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.