XSL function or code for ASCII conversion ?

I am a newbie in XSL and I tried searching and didn't find a XSL function to convert ASCII values in an XML to its equivalent alphanumerals using XSL transformation.
Is there a XSL function to do the same ?
Any suggestions would be really helpful.

There are such functions for converting Unicode codepoints to characters in XSLT2.
Pete

Similar Messages

  • NEED FUNCTIONAL/TECHNICAL SPEC FOR GL CONVERSION

    Can someone please email me the functional and also technical spec for GL conversion. I need to give the functional spec to the Abaper to do LSMW.
    Any advise and guidance in this regard will be greatly appreciated.
    Please send me documentation on the spec sheet for gl conversion. I need to prepare one and give to the technical person by tomorrow. Email it to me at [email protected]
    Please send me asap
    thanks a lot
    Lakshmi

    Lakshmi, can you please send me the format of that func spec, if possible?

  • Function module used for formatting alv

    hi gurus,
    which function module is uesd to format alv?

    Hi
    see the following
    ABAP List Viewer
    The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
    This helps us to implement all the features mentioned very effectively.
    Using ALV, We can have three types of reports:
    1. Simple Report
    2. Block Report
    3. Hierarchical Sequential Report
    There are some function modules which will enable to produce the above reports without much effort.
    All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
    1. SIMPLE REPORT.
    The important function modules are
    a. Reuse_alv_list_display
    b. Reuse_alv_fieldcatalog_merge
    c. Reuse_alv_events_get
    d. Reuse_alv_commentary_write
    e. Reuse_alv_grid_display
    A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
    The Important Parameters are :
    I. Export :
    i. I_program_name : report id
    ii. I_internal_tabname : the internal output table
    iii. I_inclname : include or the report name where all the dynamic forms are handled.
    II Changing
    ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
    declared in the type pool SLIS.
    C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
    Parameters :
    I. Import :
    Et_Events : The event table is returned with all possible CALLBACK events
    for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
    II. Export :
    I_List_type :
    0 = simple list REUSE_ALV_LIST_DISPLAY
    1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
    2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
    3 = hierarchical-sequential block list
    REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
    Parameters :
    I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
    This internal table has three fields :
    Typ : ‘H’ – header, ‘S’ – selection , ‘A’ - action
    Key : only when typ is ‘S’.
    Info : the text to be printed
    E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
    Parameters : same as reuse_alv_list_display
    This is an example for simple list.
    2. BLOCK REPORT
    This is used to have multiple lists continuously.
    The important functions used in this report are:
    A. REUSE_ALV_BLOCK_LIST_INIT
    B. REUSE_ALV_BLOCK_LIST_APPEND
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    A. REUSE_ALV_BLOCK_LIST_INIT
    Parameters:
    I. I_CALLBACK_PROGRAM
    II. I_CALLBACK_PF_STATUS_SET
    III. I_CALLBACK_USER_COMMAND
    This function module is used to set the default gui status etc.
    B. REUSE_ALV_BLOCK_LIST_APPEND
    Parameters :
    Export :
    I. is_layout : layout settings for block
    II. it_fieldcat : field catalog
    III. i_tabname : internal table name with output data
    IV. it_events : internal table with all possible events
    Tables :
    i. t_outtab : internal table with output data.
    This function module adds the data to the block.
    Repeat this function for all the different blocks to be displayed one after the other.
    C. REUSE_ALV_BLOCK_LIST_HS_APPEND
    This function module is used for hierarchical sequential blocks.
    D. REUSE_ALV_BLOCK_LIST_DISPLAY
    Parameters : All the parameters are optional.
    This function module display the list with data appended by the above function.
    Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
    3. Hierarchical reports :
    Hierarchical sequential list output.
    The function module is
    A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
    Parameters:
    I. Export:
    i. I_CALLBACK_PROGRAM
    ii. I_CALLBACK_PF_STATUS_SET
    iii. I_CALLBACK_USER_COMMAND
    iv. IS_LAYOUT
    v. IT_FIELDCAT
    vi. IT_EVENTS
    vii. i_tabname_header : Name of the internal table in the program containing the
    output data of the highest hierarchy level.
    viii. i_tabname_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    ix. is_keyinfo : This structure contains the header and item table field
    names which link the two tables (shared key).
    II. Tables
    i. t_outtab_header : Header table with data to be output
    ii. t_outtab_item : Name of the internal table in the program containing the
    output data of the lowest hierarchy level.
    slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.
    Important Attributes :
    A. col_pos : position of the column
    B. fieldname : internal fieldname
    C. tabname : internal table name
    D. ref_fieldname : fieldname (dictionary)
    E. ref_tabname : table (dictionary)
    F. key(1) : column with key-color
    G. icon(1) : icon
    H. symbol(1) : symbol
    I. checkbox(1) : checkbox
    J. just(1) : (R)ight (L)eft (C)ent.
    K. do_sum(1) : sum up
    L. no_out(1) : (O)blig.(X)no out
    M. outputlen : output length
    N. seltext_l : long key word
    O. seltext_m : middle key word
    P. seltext_s : short key word
    Q. reptext_ddic : heading (ddic)
    R. ddictxt(1) : (S)hort (M)iddle (L)ong
    S. datatype : datatype
    T. hotspot(1) : hotspot
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    Check the program in the following link:
    http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    13. Top-of-page in ALV
    selection-screen and top-of-page in ALV
    14.  ALV Group Heading
    http://www.sap-img.com/fu037.htm
    How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    15. ALV output to PDF conversion
    It has an example code for PDF Conversion.
    http://www.erpgenie.com/abap/code/abap51.htm
    converting the output of alv in pdf
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Regards
    Anji

  • Content Query Web Part (CQWP) displaying ASCII code for the colon portion of a time

    I'm having an issue with a CQWP displaying : for the colon portion of a time.  For example, instead of 6:30, the CQWP shows 6:30. 
    I checked our encoding which is set to UTF-8.  We also have a custom style on the CQWP and I've made sure that our custom itemstyle.xsl file has the disable-output-escaping property set to yes. 
    When I look at the list I'm querying from, the ascii code is not showing in there; it's displaying properly as 6:30.  I tried to flip this by replacing the colon with the ascii symbol in the list but it still showed the ascii code on the CQWP.
    Any ideas?

    Hi Cameron,  thanks for your reply.  The solution in the blog would work for an area that is only for date or time.  Unfortunately, this particular section of my CQWP is more than just a time; it's the summary of a news article--
    which may or may not contain a time depending on what the news article is about. 
    In further testing I have also noticed, when viewing the source code, that the colon is represented as
    : which tells me that the ampersand of the ascii code for the colon is also being convertied to ascii (in a sort-of double
    conversion situation.)  This isn't something I've ever seen before.

  • Function modules for unit conversion

    hai gurus.
    what is the function module to make one qty to the same unit as other qty.
    if one is in kg and other in pounds
    i want to make both in pounds.
    pls help me with this

    Hi
    chk UNIT_CONVERSION_SAMPLE
    also chk this
    CF_UT_UNIT_CONVERSION
    Some Insights-
    Unit conversions
    with NW2004s the HOW-TO GUIDE for qty conversion is obsolete.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/b65c42b4e05542e10000000a1550b0/content.htm
    As of SAP NetWeaver 2004s you can create quantity conversion types using transaction RSUOM.
    The business transaction rules of the conversion are established in the quantity conversion type. The conversion type is a combination of different parameters (conversion factors, source and target units of measure) that determine how the
    conversion is performed.
    In terms of functionality, quantity conversion is structured similarly to currency translation.
    Quantity conversion allows you to convert key figures with units that have different units of measure in the source system into a uniform unit of measure in the BI system when you update them into InfoCubes
    http://help.sap.com/saphelp_nw04s/helpdata/en/27/b38c4284a8c353e10000000a1550b0/content.htm
    It is entered in ODS table linked to info object (0material)
    What you need to do basically is-
    1 ) Goto your infoobject for eg- 0material
    2 ) In Info object Maintenance- Tab page- Bex Explorer
    3 ) Enter 0BASE_UOM in Base unit of measure
    4 ) Generate UOM ODS (System generates it with prefix UOM)
    It is made of 4 fields (1 more in case of compounding) with SID for them. This is the place where you enter numerator and
    denominator to calculate conversion factor
    5 ) Load the UOM ODS with conversion from 0MAT_UNIT_ATTR or flat file
    6 ) Define conversion type
    7 ) In the conversion type, then you can select 0Material in the dynamic determination of conversion factor
    8 ) Select source unit and target unit
    For more help refer SAP help file on NW2004s. It is comprehensive and even explain - How to do unit conversion in
    transformation rule?
    http://help.sap.com/saphelp_nw04s/helpdata/en/4f/707242df019c60e10000000a1550b0/content.htm
    Check this sample code,
      CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
        EXPORTING
    *     CLIENT                  = SY-MANDT
          DATE                    = pdate
          FOREIGN_AMOUNT          = p_amt1
          FOREIGN_CURRENCY        = p_curr1
          LOCAL_CURRENCY          = p_curr2
    *     RATE                    = 0
    *     TYPE_OF_RATE            = 'M'
    *     READ_TCURR              = 'X'
        IMPORTING
          EXCHANGE_RATE           = w_rate
          FOREIGN_FACTOR          = w_fact1
          LOCAL_AMOUNT            = w_amt
          LOCAL_FACTOR            = w_fact2
    *     EXCHANGE_RATEX          =
    *     FIXED_RATE              =
    *     DERIVED_RATE_TYPE       =
        EXCEPTIONS
          NO_RATE_FOUND           = 1
          OVERFLOW                = 2
          NO_FACTORS_FOUND        = 3
          NO_SPREAD_FOUND         = 4
          DERIVED_2_TIMES         = 5
          OTHERS                  = 6.
      IF SY-SUBRC <> 0.
        write: / 'Conversion to loc.curr. failed:',
                 p_curr1, '->', p_curr2, 'err.code=', sy-subrc.
      ELSE.
        write: / 'to Loc.curr:', p_amt1 currency p_curr1, p_curr1, '->',
               w_amt currency p_curr2, p_curr2,
               '(', w_rate, ')', w_fact1, w_fact2.
      ENDIF.
    http://www.geocities.com/victorav15/sapr3/examples/currconv.txt
    Check this
    CONVERSION_FACTOR_GET
    Measurement unit conversion: Get measurement unit conversion factor Not for Dimensionless Units of Measure
    UNIT_CONVERSION_SIMPLE Measurement unit conversion by table T006, with rounding
    UNIT_OF_MEASURE_SAP_TO_ISO 
    UNIT_OF_MEASURE_ISO_TO_SAP
    MATERIAL_UNIT_CONVERSION Material quantity conversion from Base Unit of Measure to Alternative Unit of Measure and vice versa. For Dimensionless Units of Measure (Each, Piece, Box etc.) conversion depends on the given Material (see table MARM). For other Units of Measure (Length, Weigth etc.) conversion can be calculated from the T006 table or via CONVERSION_FACTOR_GET.
    CONVERSION_EXIT_CUNIT_INPUT Conversion exit for commercial (3-char) measurement unit INPUT
    CONVERSION_EXIT_CUNIT_OUTPUT Conversion exit for commercial (3-char) measurement unit OUTPUT
    CONVERSION_EXIT_LUNIT_INPUT Conversion exit for technical (6-char) measurement unit INPUT
    CONVERSION_EXIT_LUNIT_OUTPUT Conversion exit for technical (6-char) measurement unit OUTPUT
    UNIT_OF_MEASUREMENT_HELP Input help for measurement units of a predefined dimension
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Reward all helpfull answers
    Regards
    Pavan

  • How to find function code for buttons on toolbar in oops alv

    Hi experts,
    I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
    method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALV

    Hi Prakash,
    -->First you have to set the pf status in your alv program by,
    {FORM pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'FIRST'.
    ENDFORM.                    "PF_STATUS}
    -->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
          i_callback_pf_status_set          = 'PF_STATUS'}
    *-->Then doble click on that pf status,
    From the menu bar, select Extras->Adjust Template->List Viewer,
    This will give you the existing statndard gui status of the program*
    ->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
          i_callback_user_command           = 'COMM'
    And make a subroutine of the name 'COMM'i.e,
    FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA: okcode TYPE sy-ucomm.
      okcode = ucomm.
      CASE okcode.
        WHEN 'REF'.
        CALL FUNCTION 'POPUP_TO_INFORM'
          EXPORTING
            titel         = 'MANSI'
            txt1          = 'CREATED BY'
            txt2          = SY-UNAME
          TXT3          = ' '
          TXT4          = ' '
    endcase.
    Hope it helps you
    Regrds
    Mansi

  • [svn] 4634: First part of glue code for allowing Halo components to use the new Text Layout Framework , in order to get functionality such as bidirectional text.

    Revision: 4634
    Author:   [email protected]
    Date:     2009-01-22 17:38:56 -0800 (Thu, 22 Jan 2009)
    Log Message:
    First part of glue code for allowing Halo components to use the new Text Layout Framework, in order to get functionality such as bidirectional text.
    Background:
    TLF is making this possible by implementing a TLFTextField class. It is a Sprite that uses TLF to implement the same properties and methods as the legacy TextField class in the Player. Thanks to the createInFontContext() bottleneck method in UIComponent, it can be used by a properly-written Halo component (such as those in Flex 3) without any modifications to the component.
    Note: Text should render similarly -- but is unlikely to render identically -- when a component uses TLFTextField vs. TextField. The width and height may be different, affecting layout; text could wrap differently; etc. This is a fact-of-life based on the fact that TLF/FTE and TextField are completely different text engines.
    Whether a Halo component uses TLF or not to render text will be determined in Flex 4 by a new style, textFieldClass. (Gumbo components always use TLF.)
    TLFTextField is currently only partially implemented. It does not yet support scrolling, selection, editing, multiple formats, or htmlText. Therefore it can only be used for simple display text, such as a Button label.
    Details:
    The TextStyles.as bucket 'o text styles now includes a non-inheriting textFieldClass style. It can be set to either mx.core.UITextField or mx.core.UITLFTextField. These are the Flex framework's wrapper classes around the lower-level classes flash.text.TextField (in the Player) and its TLF-based workalike, flashx.textLayout.controls.TLFTextField.
    The global selector in defaults.css currently sets it to mx.core.UITextField using a ClassReference directive. For the time being, all Halo components will continue to use the "real" TextField.
    The new UITLFTextField is a copy of UITextField, except that it extends TLFTextField instead of TextField. This class has been added to FrameworkClasses.as because no classes in framework.swc have a dependency on it. It will get soft-linked into applcations via the textFieldClass style.
    The TLFTextField class currently lives in a fourth TLF SWC, textLayout_textField.swc. This SWC has been added to various build scripts. The external-library-path for building framework.swc now includes all four TLF SWCs, because UITLFTextField can't be compiled and linked without them. However, since they are external they aren't linked into framework.swc.
    Properly-written Halo UIComponents access their text fields only through the IUITextField interface, and they create text fields like this:
    textField = IUITextField(createInFontContext(UITextField));
    (The reason for using createInFontContext() is to support embedded fonts that are embedded in a different SWF.)
    The createInFontContext() method of UIComponent has been modified to use the textFieldClass style to determine whether to create a UITextField or a UITLFTextField.
    With these changes, you can now write code like
    to get two Buttons, the first of which uses UITextField (because this is the value of textFieldClass in the global selector) and the second of which uses UITLFTextField. They look very similar, which is good!
    Currently, both Buttons are being measured by using an offscreen TextField. A subsequent checkin will make components rendering using UITLFTextField measure themselves using an offscreen TLFTextField so that measurement and rendering are consistent.
    QE Notes: None
    Doc Notes: None
    Bugs: None
    Reviewer: Deepa
    Modified Paths:
        flex/sdk/trunk/asdoc/build.xml
        flex/sdk/trunk/build.xml
        flex/sdk/trunk/frameworks/projects/framework/build.xml
        flex/sdk/trunk/frameworks/projects/framework/defaults.css
        flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as
        flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/TextStyles.as
    Added Paths:
        flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITLFTextField.as

    Many of your points are totally legitimate.
    This one, however, is not:
    …To put it another way, the design of the site seems to be geared much more towards its regular users than those the site is supposedly trying to "help"…
    The design and management of the forums for more than five years have driven literally dozens of the most valuable contributors and "regulars" away from the forums—permanently.
    The only conclusion a prudent, reasonable person can draw from this state of affairs is that Adobe consciously and deliberately want to kill these forums by attrition—without a the PR hit they would otherwise take if they suddenly just shut them down.

  • Code For Delta Extraction Using Function Module

    Dear Experts,
    I want a sample code for Delta Extraction using Function Module ( If it is customized already working code very helpful ), I have already created Function Module but Full update is happening. If I give delta update again it is retrieving all records. It is very urgent, if you have please send me to the following mail ID.
    [email protected]
    Best Regards,
    SGK.

    Dear KJ,
    Thank for your response. I saw the code that you sent, you have used some ztables like ZSC_DELTA_IP, ZSC_SAFETY_DELTA, ZSC_SET_EXT_TIME
    What are the fields that you have created in these tables , what is use of these tables, can you send the fields that you have used in these tables.
    Thanks & Regards,
    SGK

  • Need code for a function module- Urgent

    Hi friends,
    I have a requirement where I am giving material description as an import parameter in the function module. ( Material description could be a wild search -- say - Mat* ) I want a sub routine in the function module which should get all the materials from the database ( mara or makt..not sure ) for the user entered Material description.
    I want this particular code to be written using a sub-routine using formal parameters inside this fm . Could any one send me the code for this.
    Thanks in advance,
    Vishnu.

    Hi Vishvanath,,
    Please find the below code.
    DATA : BEGIN OF itab OCCURS 0,
           matnr LIKE makt-MATNR,
           MAKTX LIKE makt-MAKTX,
           END OF itab.
    DATA : BEGIN OF itab1 OCCURS 0,
           matnr LIKE makt-MATNR,
           MAKTX LIKE makt-MAKTX,
           END OF itab1.
    data : a(5) type c value 'TEST'.
    perform mat_no using a.
    form mat_no  using    p_a.
    data : lv_temp(4) type c.
    select matnr maktx from makt into table itab.
    loop at itab.
    lv_temp = itab-maktx+0(4).
    if lv_temp = p_a.
      move itab to itab1.
      APPEND ITAB1.
    endif.
    endloop.
    loop at itab1.
    write :/ itab1.
    endloop.
    endform.                    " mat_no
    Thanks.
    Amjad.

  • How to create a transaction code for a function group with screen 100 as st

    Hello ,
    I have requirement where I need to create a function group and create screen 100, 200, 300 and include the function in the screens.
    Customer asked me to create a transaction with the screen 100 as the starting screen.
    Can you please let me know how to create a transaction code for a function group with screen 100 as starting screen.
    [ It is not a module pool program ].
    Thanks
    Prashanth.
    Moderator message - Please ask a specific question and do not ask the forum to do your work for you - post locked
    Edited by: Rob Burbank on Jun 2, 2009 11:49 AM

    Go to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
    Name of screen field:                               Value
    D_SREPOVARI-REPORTTYPE                RW
    D_SREPOVARI-REPORT                        ZPCA
    Save and transport accordingly.

  • Function code for dropdown on OO ALV Grid to trigger user_command

    Hi Experts,
    I know we can add a dropdown to a column of an OO ALV Grid, set values to the dropdown list and allow the user to select some these values.
    However , what I'm not sure is that if we can *assign a function code to the dropdown * which would then trigger the event user_command ( PAI ) of the ALV class so I can handle the changes to when a particular value is selected from a dropdown list, just like we do in normal dialogs.
    Now I know that I can register the 'Enter' event and handle the data changes in data_changed event, but that is something I want to avoid the user from doing as far as possible to make the report more user friendly.
    Awaiting your valuable inputs and would really appreciate your help.
    Thanks & regards,
    Advait

    Hi Advait,
    No problem. Yes, this functionality requires changing the focus to other cell.
    I think there is other solution. As the dropdown is kind of F4 activity try this way:
    data: it_f4 type lvc_t_f4,
            wa_f4 type lvc_s_f4.
            wa_f4-FIELDNAME = 'CONNID'.
            wa_f4-REGISTER = 'X'.
            wa_f4-GETBEFORE = 'X'.
            wa_f4-CHNGEAFTER = 'X'.
            append wa_f4 to it_f4.
    "register F4 event
      CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4  = it_f4.
    "Once you try to pick the value HANDLE_DATA_CHANGED event will be triggered
    "Definition
         methods:
         handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
                                  IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
    "Implementation
    METHOD handle_data_changed .
        DATA: ls_mod_cells TYPE lvc_s_modi.
        IF e_onf4_before = 'X'.
          MESSAGE 'Data changed before F4' TYPE 'I'.
        ENDIF.
        IF e_onf4 = 'X'.   "if event triggered by F4
          MESSAGE 'Data changed on F4' TYPE 'I'.
        ENDIF.
        IF e_onf4_after = 'X'.
          MESSAGE 'Data changed after F4' TYPE 'I'.
        ENDIF.
       "here you know which cell was modified
        LOOP AT er_data_changed->mt_mod_cells INTO ls_mod_cells.
         "just example test case, here you can implement your code for modified cells
          IF ls_mod_cells-value >=5.
            CALL METHOD er_data_changed->add_protocol_entry
              EXPORTING
                i_msgid     = 'SABAPDOCU'
                i_msgty     = 'E'
                i_msgno     = '888'
                i_msgv1     = 'Only numbers below 5 are possibe'
                i_msgv2     = 'Please correct'
                i_fieldname = ls_mod_cells-fieldname
                i_row_id    = ls_mod_cells-row_id.
            CALL METHOD er_data_changed->modify_cell
              EXPORTING
                i_fieldname = ls_mod_cells-fieldname
                i_row_id    = ls_mod_cells-row_id
                i_value     = space.
          ENDIF.
        ENDLOOP.
      ENDMETHOD.                    "handle_data_changed
    This approach works fine for picking value from input help. Never tried it for dropdown list. You have to try it out.
    Regards
    Marcin

  • How to insert a code for a function module into a Customer Exit Variable?

    I have two Key Figures viz., Net Prchs Rtl, and Net Prchs Unt. Both these Key figures have This Week (TW) and Last Week (LW). There is a variable for This week but there is no variable defined for Last week.
    I need to get data in the column LW (Last Week) for both the key figures.
    In function module EXIT_SAPLRRS0_001 one of the functions I have is:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    I need to create a new variable to get values in the Last week column for different key figures and use function “'DATE_TO_PERIOD_CONVERT'” in that variable.
    Can anyone please explain me the steps as to how to use a function module in a variable so that when the variable is used in a key figure it shows the output.
    In other words what I want to know is after creating a Customer exit variable of type Characteristic value how do I refer the above mentioned function moduel and insert the code for the function module into the Customer exit variable that I created.
    Thank you.
    TR.

    Hi Wond,
    Thanks a lot for your reply. I understand what you mean but I have never done this before so can you please explain it in a detailed manner. I have the following code:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                EXPORTING
                  i_date         = ld_date
                  i_periv        = lc_periv
                IMPORTING
                  e_buper        = ln_poper
                  e_gjahr        = ln_bdatj
                EXCEPTIONS
                  input_false    = 1
                  t009_notfound  = 2
                  t009b_notfound = 3
                  OTHERS         = 4.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ELSE.
                lc_poper = ln_poper.
                CONCATENATE ln_bdatj lc_poper+1(2) INTO wa_e_t_range-low.
                wa_e_t_range-sign = 'I'.
                wa_e_t_range-opt = 'EQ'.
                APPEND wa_e_t_range TO e_t_range.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    I believe I should now use the above code in my customer exit variable. If that's right can you please explain me the steps as to how should I do this so that the variable gets populated.
    Thank you.
    Regards,
    TR.

  • Function code for notification in a custom scenario

    Hi,
    Does anyone know the activity code or function code for a notification that needs to be sent to the organiser of a training event if the maximum capacity of the event is exceeded, i.e. the attendee goes on the waiting list.
    There seems to be no standard activity type which gets triggered the moment the max. capacity of the training event is exceeded.(unlike BOKP)
    Does anyone know the workaround for this ?
    As far as I know you cannot create your own activity based on your custom scenario.
    Hence how to handle this ?

    You can use CRM_ORDER_MAINTAIN and populate the parameter IT_SERVICE_OS
    or use BAPI_OPPORTUNITY_CHANGEMULTI and populate the parameter SERVICE_OS.
    BR,
    Florin

  • Process code for Function Module IDOC_INPUT_MBGMCR

    hello!!
    here i m tryin to create n inbound idoc
    idoc type - MBGMCR02
    Function Module - IDOC_INPUT_MBGMCR
    but i dont knw the process code for dat can ny 1 help me to find it?
    1st of all how to find da process code if u hav the FM ?
    it wld b more helpful if ny1 cld give me the process code
    thank u
    ashwinee

    hai
    if u dont have process code r cant able to find process code,
    u create process code its very easy. 
      for inbound, go to
       TX-WE42.
      click create give ur process code and give that function module.
      in processing type,
               u check the radiobutton as processing by function module and save it.
    then, u can use this process code in our partner profile .
    any doubt regarding this u can ask me.
    Message was edited by:
            tamilarasan kandasamy

  • Code for SAVE functionality in FPM_OIF_COMPONENT

    Hi Experts,
    I have enhanced the component DPR_DET_DATA_PROJECT_O. The SAVE functionality for this component exists in FPM_OIF_COMPONENT.
    I have to raise error message depending on the custom fields added in  DPR_DET_DATA_PROJECT_O when I click on 'SAVE' button.
    Please share if any ideas where to write the code for SAVE functionality for the custom fields added on DPR_DET_DATA_PROJECT_O.
    Regards,
    Rafi

    Hi Rafi,
    These similar discussions might provide some assistance:
    BAdI or enhancement on SAVE of Cproject
    which badi triggers while saving cproject
    Code to call for saving the data in WDC - DPR_PROJECT_VIEW
    Cheers,
    Amy

Maybe you are looking for