Code generators is ABAP

Hi all,
is it possible to Write a program which can create a Function Module with the import,export parameters and coding.
iam always creating same kind of function modules with small differences.
is it possible??????

Hi sai,
1. RS_FUNCTION_COPY
   use the above FM
   (to copy from existing fm within a group)
2. Pass these three parameters
   and rest it will do.
NEW_GROUP
NEW_NAME
OLD_NAME
3. After that u need to ACTIVATE it for using.
regards,
amit m.

Similar Messages

  • Reg calling Transaction code in Webdynpro ABAP

    Hi All,
    Can I call Transaction code in Webdynpro ABAP Portal Application. If so, how can this be possible? Can anybody give me a lead?
    Thanks.
    Kumar Saurav.

    Hi,
    The most easy Way is here:
    1) Test any Webdynpro Application from SE80 when the webdynpro Browser opens to display output
    Copy its HTTP link, Suppose we get the below link
    http://r3d01web1.Siemens.dk:8001/sap/bc/webdynpro/sap/z_dynamic_view?sap-client=002&sap-language=EN
    2) Now replace some part of the above link ( webdynpro/sap/z_dynamic_view?sap-client=002&sap-language=EN )  with the new link part ( gui/sap/its/webgui?~transaction=PA30 )
    So that the newly generated link is such that the below one:
    http://r3d01web1.Siemens.dk:8001/sap/bc/gui/sap/its/webgui?~transaction=PA30
    Note in place of PA30 you can put any of your desired tcode.
    3) Now Just Make a webdynpro component and in its View layout put a LINK TO URL ui element
    and in its property REFERENCE just past the http link ( http://r3d01web1.Siemens.dk:8001/sap/bc/gui/sap/its/webgui?~transaction=PA30 )
    4) Activate and test your webdynpro Application.

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • How to assign transaction code to a ABAP program?

    Hi,
    Need help in assigning transaction code to a ABAP program. Any method that will do the job?

    >
    sainath raj wrote:
    > hi
    > within my knowledge
    > Any ABAP program can have its own transaction code if and only if it is of type 'MODULE POOL' .
    > An EXECUTABLE program  cannot have a transaction code.
    >
    > So try with this .
    >  1) Go to the attributes of the program and change the program as type module pool
    >   2) then execute transaction SE93.
    >  3) give the appropriate program name and assign a transaction code as ur wish.
    Well Sainath,
    What u said is not correct, an executable report can have a transaction code, difference between module pool and executable program is that u neccesarily need to have a tcode for module pool but that doesn't mean that only module pool can have tcode.
    And secondly u should not answer these kind of simple questions, as people then continue posting simple questions without making an effort to serach for themselves.
    кu03B1ятu03B9к.

  • Code to use ABAP proxy

    hi all,
    can anybody please send me any sample code to call ABAP proxy.
    the ABAP proxy is already being created and i have all the class and methods names.
    i have to pick up some fields from a Z-table and have to send them as a message to XI.
    thanks in advance,
    shweta upadhyay.

    data:
    lo_clientproxy     type ref to <clinet proxy class name> ,
      lo_sys_exception   type ref to cx_ai_system_fault,
    Structures to set and get message content
       ls_request         type <type created in the clientn proxy generation>,
       ls_response        type <type created in the clientn proxy generation>,
    create object lo_clientproxy.
    try.
        call method lo_clientproxy-><method to call>
          exporting
            input  = ls_request
          importing
            output = ls_response.
      catch cx_ai_system_fault into lo_sys_exception.
      Error handling
    endtry.
    commit work.
    Regards
    Raja

  • How can i get access code to create ABAP Program ?

    hi guys ,
    How can i get access code for creating ABAP Program in my System.
    I am using SAP IDES 4.6 Version
    Please Help me out .
    Regards
    Raghu

    Hi Raghu,
    - license your system (http://service.sap.com/licensekey)
    - create a developer key (http://service.sap.com/sscr)
    - create a key for your ABAP program (httP://service.sap.com/sscr)
    Markus

  • JSP Code Generators

    Can somebody suggest some code generators for JSP.

    See JSF (JavaServer Faces). This may be better suited for you.

  • Code for hr-abap report in alv display

    Hi Gurus,
    I am new to hr-abap and I want some sample code to display a hr report in an alv.
    Thanks,
    Raj.

    This is one such...
    REPORT yh_rep_hr_certified_instructor MESSAGE-ID yh_messages NO STANDARD
    PAGE
    HEADING .
    Program      : YH_REP_HR_CERTIFIED_INSTRUCTOR                        *
    Description  : Certified Instructor Eligibility Criteria             *
                       TABLES                                       *
    TABLES :hrp1000 ,hrp1001, pa0000.
                          TYPE-POOLS                                 *
    *Type Pool for ALV display
    TYPE-POOLS :slis.  " Global types for generic cunning components
                    INTERNAL TABLES                                 *
    *Internal Table to keep Selection Screen field values
    DATA : BEGIN OF t_validation OCCURS 0.
            INCLUDE STRUCTURE dynpread.
    DATA END OF t_validation.
    *Internal Table for Business Event Groups
    DATA : BEGIN OF t_bgrp OCCURS 0,
            objid TYPE hrobjid,
            blank(1),
            stext TYPE stext,
           END OF t_bgrp.
    *Internal Table for Business Event Type IDs with text for selected Event
    *GROUPS
    DATA : BEGIN OF t_btyp OCCURS 0,
            objid TYPE hrobjid,
            blank(1),
            stext TYPE stext,
           END OF t_btyp.
    *Internal Table for Business Event Type IDs for selected Event Groups
    DATA : BEGIN OF t_eventtypelist OCCURS 0,
            objid TYPE hrobjid,
           END OF t_eventtypelist.
    *Internal table to store the business Groups
    DATA : BEGIN OF t_group OCCURS 0,
            objid LIKE hrp1001-objid,
            sobid LIKE hrp1001-sobid,
            sclas LIKE hrp1001-sclas,
           END OF t_group.
    *Internal table to hold the business event group and/or bus. event types
    DATA : BEGIN OF t_eventgroup OCCURS 0,
            objid LIKE hrp1001-objid,
           END OF t_eventgroup.
    *Internal Table for FieldCatalog used for ALV Display
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    *Work Area for Checking Business Event Group Validity
    DATA: BEGIN OF wa_bgrp,
           objid TYPE hrobjid,
           stext TYPE stext,
          END OF wa_bgrp.
    *Internal table to fetch object id for Qualification
    DATA: BEGIN OF t_objid OCCURS 0,
           objid TYPE hrp1000-objid,
           sobid TYPE hrp1001-sobid,
           sobid_copy TYPE hrp1001-objid,
          END OF t_objid.
    *Internal table to fetch Id of related object
    *Fetches Pernr of Certified Instructors
    DATA: BEGIN OF t_sobid OCCURS 0,
           objid TYPE hrp1000-objid,
           sobid TYPE hrp1001-sobid,
           adatanr TYPE hrpad31-adatanr,
           sobid_copy TYPE hrp1001-objid,
         END OF t_sobid.
    *Internal table to fetch skill rating
    *of the Instructor
    DATA: BEGIN OF t_prof OCCURS 0,
            adatanr TYPE hrpad31-adatanr,
            chara TYPE hrpad31-chara,
          END OF t_prof.
    *Internal table to fetch grade
    *of the Insturctor
    DATA: BEGIN OF t_grade OCCURS 0,
           pernr TYPE pa0008-pernr,
           yysalgr TYPE pa0008-yysalgr,
          END OF t_grade.
    *Internal table which contains all information about the Person like
    *Name Project Project Manager Name Account and Vertical Name
    DATA: t_projdetails TYPE zbapi_projdetails OCCURS 0 WITH HEADER LINE.
    *Final Internal table which contains all information
    *about the Instructors
    DATA: BEGIN OF t_final OCCURS 0,
             empid TYPE pa0000-pernr,
             empname(84) TYPE c,
             grade TYPE pa0008-yysalgr,
             atndttt(3) TYPE c,
             sklrate TYPE hrpad31-chara,
             pgmng TYPE pa0001-ename,
             accname TYPE hrp1000-stext,
             vertname TYPE hrp1000-stext,
           END OF t_final.
                         VARIABLES                                  *
    *ALV layout
    DATA: gs_layout TYPE slis_layout_alv, "alvtot test
          gt_events TYPE slis_t_event,
          gt_list_top_of_page TYPE slis_t_listheader,
          gs_variant LIKE disvariant,     "For Layout
          g_save.                         "For Layout Save
    DATA: w_pos TYPE i VALUE 1,            " Position of Fields in ALV
          w_sort TYPE slis_t_sortinfo_alv, "ITab for Sorting Options
          w_flag TYPE i,
          w_repid TYPE sy-repid,
          w_lineno TYPE sy-tabix.
    DATA: l_short TYPE hrp1000-short. "variable to check the heirarchy
                     SELECTION-SCREEN DESIGN                            *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. "NO INTERVALS .
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(20) text-009 MODIF ID xyz.
    PARAMETERS : p_bgrp TYPE hrobjid OBLIGATORY,
                 p_bgrp1 TYPE stext .
    SELECTION-SCREEN END OF LINE.
    SELECT-OPTIONS :s_btyp FOR hrp1000-objid OBLIGATORY NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK b1.
                            INITIALIZATION                               *
    INITIALIZATION.
    *Assign Program Name into a variable
      w_repid = sy-repid.
    *Build layout for list display
      gs_layout-detail_popup      = 'X'.
    *To get All Events in TOP-OF-PAGE
    perform eventtab_build using gt_events[].
      gs_variant-report = w_repid.
      g_save           = 'A'.
                         AT SELECTION SELECTION                          *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bgrp.
      PERFORM get_bgrp.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_btyp-low.
      IF NOT p_bgrp IS INITIAL .
        PERFORM get_btyp USING 'l'.
      ELSE .
        MESSAGE s999 WITH text-e09.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_btyp-high.
      IF NOT p_bgrp IS INITIAL .
        PERFORM get_btyp USING 'h'.
      ELSE .
        MESSAGE s999 WITH text-e09.
      ENDIF.
    AT SELECTION-SCREEN ON p_bgrp.
      SELECT SINGLE objid stext
             FROM hrp1000
             INTO wa_bgrp
             WHERE objid = p_bgrp AND
             otype = 'L' AND
             plvar = '01' AND
             ( short = 'ROLE' OR
             short = 'TECH_PROGRAM' ).
      IF sy-subrc EQ 0.
        p_bgrp1 = wa_bgrp-stext.
      ELSE.
        MESSAGE e999 WITH text-e09.
      ENDIF.
    AT SELECTION-SCREEN ON s_btyp.
      CLEAR : t_eventtypelist, t_group, t_eventgroup.
      REFRESH : t_eventtypelist, t_group, t_eventgroup.
      CLEAR : w_flag.
    *Fetch all the subordinates under given Event Group - L/D
      SELECT objid
             sobid
             sclas
                 FROM hrp1001
                 INTO TABLE t_group
                 WHERE objid = p_bgrp
                 AND plvar = '01'
                 AND rsign = 'B'
                 AND relat = '003'
                 AND ( sclas = 'L' OR sclas = 'D' ).
      WHILE w_flag <> 1.
        PERFORM get_objids.
      ENDWHILE.
      IF NOT t_eventtypelist[] IS INITIAL.
    *Get only valid Event Types from input Event Types, for given Event
    *Group - by deleting others..
        LOOP AT t_eventtypelist.
          IF t_eventtypelist-objid IN s_btyp.
            EXIT.
          ELSE.
            DELETE t_eventtypelist.
          ENDIF.
          AT LAST.
    *since we r checking Event Types, All other fields will be locked
    *but we need Event Group field to be unlocked to edit again,
    *if theres no theres no valid Event Types in given input
            LOOP AT SCREEN.
              CHECK screen-name = 'P_bgrp'.
              screen-input = '1'.
              MODIFY SCREEN.
            ENDLOOP.
            MESSAGE e999 WITH text-e04.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          CHECK screen-name = 'P_bgrp'.
          screen-input = '1'.
          MODIFY SCREEN.
        ENDLOOP.
        MESSAGE e999 WITH text-e03.
      ENDIF.
          FORM get_bgrp                                                 *
    FORM get_bgrp .
      SELECT objid stext
             FROM hrp1000
             INTO CORRESPONDING FIELDS OF TABLE t_bgrp
             WHERE plvar = '01' AND
                   otype = 'L' AND
                   short = 'ROLE' OR
                   short = 'TECH_PROGRAM' .
      CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
        EXPORTING
          endpos_col   = 75
          endpos_row   = 20
          startpos_col = 30
          startpos_row = 05
          titletext    = 'Select Business Event Group'
        IMPORTING
          choise       = w_lineno
        TABLES
          valuetab     = t_bgrp
        EXCEPTIONS
          break_off    = 1
          OTHERS       = 2.
      IF sy-subrc EQ 0 .
        READ TABLE t_bgrp INDEX w_lineno.
        IF sy-subrc EQ 0.
          p_bgrp = t_bgrp-objid.
          p_bgrp1 = t_bgrp-stext.
        ENDIF .
        CLEAR t_bgrp .
        REFRESH  t_bgrp .
      ENDIF .
    ENDFORM .                    "get_bgrp
    ****subroutine for business eventtype input criteria
    FORM get_btyp USING f_range.
      CLEAR :   t_validation,
                t_btyp,
                t_eventtypelist,
                t_group,
                t_eventgroup,
                w_flag.
      REFRESH : t_validation,
                t_btyp,
                t_eventtypelist,
                t_group,
                t_eventgroup.
      t_validation-fieldname = 'P_BGRP'.
      APPEND t_validation.
      CLEAR t_validation.
    *Getting Screen Values
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = w_repid
          dynumb               = '1000'
        TABLES
          dynpfields           = t_validation
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      READ TABLE t_validation WITH KEY fieldname = 'P_BGRP'.
      IF NOT t_validation-fieldname IS INITIAL.
    *Getting Event Group ID that entered
        LOOP AT t_validation.
          IF t_validation-fieldname = 'P_BGRP'.
            p_bgrp = t_validation-fieldvalue.
          ENDIF.
        ENDLOOP.
        CLEAR t_validation.
        REFRESH t_validation.
    *To fetch the business event groups and business event types that belong
    to the input business event group.Since a business group can have a
    *business groups as well as business event types we have pick all of
    *them
    *Getting all subordinates - Event Group/Type under given Event Group
        SELECT objid
               sobid
               sclas
                   FROM hrp1001
                   INTO TABLE t_group
                   WHERE objid = p_bgrp
                   AND plvar = '01'
                   AND rsign = 'B'
                   AND relat = '003'
                   AND endda = '99991231'
                   AND ( sclas = 'L' OR sclas = 'D' ).
    *Getting all Event Types
        WHILE w_flag <> 1.
          PERFORM get_objids.
        ENDWHILE.
        IF NOT t_eventtypelist[] IS INITIAL.
          SORT t_eventtypelist BY objid.
    *Getting Names of Event Types
          SELECT objid
                 stext
                      FROM hrp1000
                      INTO CORRESPONDING FIELDS OF TABLE t_btyp
                      FOR ALL ENTRIES IN t_eventtypelist
                      WHERE objid = t_eventtypelist-objid
                      AND otype = 'D' AND plvar = '01'
                      AND endda = '99991231'.
          IF sy-subrc = 0.
    *PopUp Display for Event Types
            CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
              EXPORTING
                endpos_col   = 75
                endpos_row   = 20
                startpos_col = 30
                startpos_row = 05
                titletext    = 'Select Business Event Type ID'
              IMPORTING
                choise       = w_lineno
              TABLES
                valuetab     = t_btyp
              EXCEPTIONS
                break_off    = 1
                OTHERS       = 2.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ELSE.
    *Since the Table returned by function module will have data in Header,
    *clear the Header
    *Retreive Selected Event Type into Select Option
              READ TABLE t_btyp INDEX w_lineno.
              IF sy-subrc EQ 0.
                IF f_range = 'l'.
                  s_btyp-low = t_btyp-objid.
                ELSE.
                  s_btyp-high = t_btyp-objid.
                ENDIF.
              ENDIF.
            ENDIF.
          ELSE.
            MESSAGE s999 WITH text-e03.
          ENDIF.
        ELSE.
          MESSAGE s999 WITH text-e01.
        ENDIF.
      ENDIF.
    ENDFORM.                    " EVNTTY
          FORM get_objids                                               *
    FORM get_objids.
    *To delete the business event types that are found and push it in
    *another table
      IF NOT t_group[] IS INITIAL.
        LOOP AT t_group.
    *If event type
          IF t_group-sclas = 'D'.
            t_eventtypelist-objid = t_group-sobid.
            APPEND t_eventtypelist.
            CLEAR t_eventtypelist.
            DELETE t_group.
    *If event group
          ELSEIF t_group-sclas = 'L'.
            t_eventgroup-objid = t_group-sobid.
            APPEND t_eventgroup.
            CLEAR t_eventgroup.
            DELETE t_group.
            CLEAR t_group.
          ENDIF.
        ENDLOOP.
      ELSE.
        w_flag = 1.
      ENDIF.
      IF NOT t_eventgroup[] IS INITIAL.
    *To get the second level of business groups and business event type
        SELECT objid sobid sclas
               FROM hrp1001
               INTO TABLE t_group
               FOR ALL ENTRIES IN t_eventgroup
               WHERE objid = t_eventgroup-objid
               AND plvar = '01'
               AND rsign = 'B'
               AND relat = '003'
               AND endda = '99991231'
               AND ( sclas = 'L' OR sclas = 'D' ).
        CLEAR t_eventgroup.
        REFRESH t_eventgroup.
      ENDIF.
    ENDFORM.                    " GET_OBJIDS
                           Start of Selection                            *
    START-OF-SELECTION.
    *Pass the Event Type and fetch the Related Id
    *for the Qualification imparted by the Event
      SELECT objid sobid
             FROM hrp1001
             INTO TABLE t_objid
             WHERE objid IN s_btyp AND
                   otype = 'D' AND
                   plvar = '01' AND
                   relat = '028' AND
                   rsign = 'A' AND
                   sclas = 'Q'.
      IF sy-subrc EQ 0.
    *Pass the Qualification Id and fetch Object Id of the
    *person who fulfills this Qualification
        SELECT objid sobid adatanr
           FROM hrp1001
           INTO TABLE t_sobid FOR ALL ENTRIES IN t_objid
           WHERE sobid = t_objid-sobid AND
                 otype = 'P' AND
                 plvar = '01' AND
                 relat = '032' AND
                 rsign = 'A' AND
                 sclas = 'Q' .
        IF sy-subrc = 0.
    *Fetch only the Person along with the skillrating
    *who has skill rating as '0001' or '0003'
          SELECT adatanr chara
                 FROM hrpad31
                 INTO TABLE t_prof
                 FOR ALL ENTRIES IN t_sobid
                 WHERE adatanr = t_sobid-adatanr AND
                ( chara = '0001' OR chara = '0003' ).
          IF sy-subrc NE 0.
            MESSAGE s999 WITH text-s01.
            EXIT .
          ELSE .
    *Fetch only Employee Id's who meets the required skill rating
    *which inturn has the EMPID who are all are Certified Instructors
            LOOP AT t_sobid.
              READ TABLE t_prof WITH KEY adatanr = t_sobid-adatanr.
              IF sy-subrc NE 0.
                DELETE t_sobid .
              ENDIF.
            ENDLOOP.
            SORT t_sobid BY objid.
            DELETE ADJACENT DUPLICATES FROM t_sobid.
          ENDIF.
        ENDIF.
      ENDIF.
      IF NOT t_sobid[] IS INITIAL.
    data: begin of it_trgpernr occurs 0,
             objid type hrp1000-objid,
             sobid type hrp1001-sobid,
           end of it_trgpernr.
    select objid sobid
            from hrp1001
            into table it_trgpernr for all entries in t_sobid
            where  otype ='P' and
                  objid = t_sobid-objid and
                  sclas = 'D' and
                  sobid = '50008220'.
    *Fetch Grade of the Certified Instructors by passing their EmpId's
        SELECT pernr yysalgr
                     FROM pa0008
                     INTO TABLE t_grade
                     FOR ALL ENTRIES IN t_sobid
                     WHERE pernr = t_sobid-objid AND endda = '99991231'.
      ENDIF.
    For Heading in the Output Display Layout
      PERFORM heading USING gt_list_top_of_page[].
                           End of Selection                              *
    END-OF-SELECTION.
    Populating data into Final Table which contains all information aboutthe Certified Instructors
    *Retrieve Employee Id for the Certified Instructors  only if he is active
      LOOP AT t_sobid.
        SELECT SINGLE *
               FROM pa0000
               WHERE pernr = t_sobid-objid  AND
                     begda <= sy-datum AND
                     endda >= sy-datum AND
                     stat2 ='3'.
        IF sy-subrc = 0.
          t_final-empid = t_sobid-objid.
          SELECT  SINGLE *
                FROM hrp1001
                WHERE otype = 'P' AND
                      objid = t_sobid-objid AND
                      rsign = 'B' AND
                      relat = '25' AND
                      sclas = 'D' AND
                      sobid = '50008220'.
    *DATA:W_SOBID TYPE HRP1001-SOBID.
    *W_SOBID = t_sobid-objid.                 .
         SELECT  SINGLE *
               FROM hrp1001
               WHERE otype = 'D' AND
                     objid = '50008220' AND
                     rsign = 'B' AND
                     relat = '25' AND
                     sclas = 'P' AND
                     sobid = W_SOBID.
          IF sy-subrc EQ 0.
            t_final-atndttt = 'YES'.
          ELSE.
            t_final-atndttt = 'NO'.
          ENDIF.
    *Retrieve Employee SkillRating for the Certified Instructors
    *by passing the adatanr value which inturn is fetched based on the empid
          READ TABLE t_prof WITH KEY adatanr = t_sobid-adatanr.
          IF sy-subrc EQ 0.
            t_final-sklrate = t_prof-chara.
          ENDIF.
    *Retrieve Employee Grade for the given id
          READ TABLE t_grade WITH KEY pernr = t_sobid-objid.
          IF sy-subrc EQ 0.
            t_final-grade = t_grade-yysalgr.
          ENDIF.
          REFRESH t_projdetails.
          CLEAR t_projdetails.
    *function which fetches the name project name account and
    *vertical name of the person for the given empid
          CALL FUNCTION 'ZBAPI_PROJDETAILS'
            EXPORTING
              pernr       = t_sobid-objid
            TABLES
              it_finaltab = t_projdetails.
          IF NOT t_projdetails[] IS INITIAL.
            SHIFT t_sobid-objid LEFT DELETING LEADING '0'.
            READ TABLE t_projdetails WITH KEY pernr = t_sobid-objid.
            IF sy-subrc EQ 0.
              t_final-empname = t_projdetails-ename.
              IF NOT t_projdetails-proj IS INITIAL.
                t_final-pgmng = t_projdetails-pmname.
              ELSE.
                t_final-pgmng = t_projdetails-gmname.
              ENDIF.
              t_final-accname = t_projdetails-accname.
              t_final-vertname = t_projdetails-vertname.
            ENDIF.
          ENDIF.
          APPEND t_final.
        ENDIF.
        CLEAR t_final.
      ENDLOOP.
      SORT t_final BY empid.
      DELETE ADJACENT DUPLICATES FROM t_final.
    *Enabling Sort by PERNR & Global ID in ALV display
      PERFORM sub_sort_info.
    *Form to Populate Field Catalog
      PERFORM populate_fieldcatalog.
    For the ALV ROW Optimize Width
      gs_layout-colwidth_optimize = 'X' .
    *perform alv_display tables final fieldcatalog.
      IF NOT t_final[] IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program = w_repid
            is_layout          = gs_layout
            it_fieldcat        = t_fieldcatalog[]
            it_sort            = w_sort
            i_save             = 'A'
            it_events          = gt_events[]
          TABLES
            t_outtab           = t_final
          EXCEPTIONS
            program_error      = 1
            OTHERS             = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ELSE.
        MESSAGE s000(vz) WITH 'No Records found for Given Input Criteria'.
      ENDIF.
                             TOP OF PAGE                                 *
    *Outputs formatted simple header information at TOP-OF-PAGE.
    TOP-OF-PAGE.
      PERFORM top_of_page.
                             Subroutines                                 *
    *&      Form  eventtab_build
          text`
         -->P_GT_EVENTS[]  text
    FORM eventtab_build USING  rt_events  TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      DATA: g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = rt_events.
      READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE g_top_of_page TO ls_event-form.
        APPEND ls_event TO rt_events.
      ENDIF.
    ENDFORM.                    " eventtab_build
    *&      Form  HEADING
          text
    FORM heading USING lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.
    *Layout Display Text - "Caritor ( India ) Pvt.Ltd "
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = text-h01.
      APPEND ls_line TO lt_top_of_page.
    *Layout Display Text - "Certified Instructor Eligibility List     "
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = text-h02.
      APPEND ls_line TO lt_top_of_page.
    ENDFORM.                    " HEADING
    *&      Form  top_of_page
          text
    -->  p1        text
    <--  p2        text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_list_top_of_page.
    ENDFORM.                    " top_of_page
    *&      Form  sub_sort_info
          text
    -->  p1        text
    <--  p2        text
    FORM sub_sort_info.
      DATA : l_sort TYPE slis_sortinfo_alv .
      CLEAR l_sort.
    Employee ID
      l_sort-fieldname = 'EMPID'.
      l_sort-up        = 'X'.
      APPEND l_sort TO w_sort.
    ENDFORM.                    " sub_sort_info
    *&      Form  populate_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM populate_fieldcatalog.
      PERFORM fill_fields_of_fieldcatalog
               TABLES t_fieldcatalog
               USING 'T_FINAL' 'EMPID' ' ' text-011 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
               TABLES t_fieldcatalog
               USING 'T_FINAL' 'EMPNAME' ' ' text-002 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
              TABLES t_fieldcatalog
              USING 'T_FINAL' 'GRADE' ' ' text-003 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
              TABLES t_fieldcatalog
              USING 'T_FINAL' 'ATNDTTT' ' ' text-004 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
              TABLES t_fieldcatalog
              USING 'T_FINAL' 'PGMNG' ' ' text-006 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
              TABLES t_fieldcatalog
              USING 'T_FINAL' 'ACCNAME' ' ' text-007 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
              TABLES t_fieldcatalog
              USING 'T_FINAL' 'VERTNAME' ' ' text-008 20 w_pos.
      PERFORM fill_fields_of_fieldcatalog
              TABLES t_fieldcatalog
              USING 'T_FINAL' 'SKLRATE' ' ' text-005 20 w_pos.
    ENDFORM.                    " populate_fieldcatalog
    *&      Form  FILL_FIELDS_OF_FIELDCATALOG
          text
         -->P_T_FIELDCATALOG  text
         -->P_0870   text
         -->P_0871   text
         -->P_0872   text
         -->P_TEXT_001  text
         -->P_20     text
         -->P_W_POS  text
    FORM fill_fields_of_fieldcatalog TABLES fp_t_fieldcatalog STRUCTURE
                                                         t_fieldcatalog
                                     USING    fp_table
                                              fp_field
                                              fp_key
                                              fp_text
                                              fp_out_len
                                              fp_pos.
      fp_t_fieldcatalog-tabname    = fp_table.
      fp_t_fieldcatalog-fieldname  = fp_field.
      fp_t_fieldcatalog-seltext_l  = fp_text.
      fp_t_fieldcatalog-key        = fp_key.
      fp_t_fieldcatalog-outputlen  = fp_out_len.
      fp_t_fieldcatalog-col_pos    = fp_pos.
      APPEND fp_t_fieldcatalog.
      CLEAR:  fp_t_fieldcatalog.
      fp_pos = fp_pos + 1.
    ENDFORM.                    " FILL_FIELDS_OF_FIELDCATALOG
    10.249.11.136\SAP-StudyMaterial

  • Bar code Generation in ABAP report

    Hi,
    Can anyone help me on how to generate bar code in ABAP report output.
    My exact requirement in the exisiting 'Z' report,I need to generate Bar code for Sales order which is displaying in report output.Buisness will scan and they will use for further processing.The Device type is HPLJ5SI printer.
    If possible please provide code for generating Bar code in ABAP report.
    Since its very urgent, if anyone provide solution quickly it will be great helpful.
    Thanks,
    Senthil

    internal table validation
    Check here mate, should be helpful.
    Mano sri

  • Debug ABAP code used for ABAP mapping

    Hi Experts,
    I have worked on Abap mapping. I have executed the code in SE24 to acheive desired mapping and the desired output is also generated.
    attached below is a part of the code i have used:
    method IF_MAPPING~EXECUTE.
    * initialize iXML
      TYPE-POOLS: ixml.
      CLASS cl_ixml DEFINITION LOAD.
    * create main factory
      DATA: ixmlfactory TYPE REF TO if_ixml.
      ixmlfactory = cl_ixml=>create( ).
    * create stream factory
      DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
      streamfactory = ixmlfactory->create_stream_factory( ).
    * create input stream
      DATA: istream TYPE REF TO if_ixml_istream.
      istream = streamfactory->create_istream_xstring( source ).
    * parse input document =================================================
    * initialize input document
      DATA: idocument TYPE REF TO if_ixml_document.
      idocument = ixmlfactory->create_document( ).
    * parse input document
      DATA: iparser  TYPE REF TO if_ixml_parser.
      iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                            istream        = istream
                                            document       = idocument ).
      iparser->parse( ).
    I just want to debug and see if an input is provided how does each of these methods make a difference to it.
    I tried to input some value in the SOURCE parameter on executing the code but it is not working fine.
    Could you please suggest hiw i should go about so that i can see the exact way the input Xstring is affected by each of these methods in the debugger.
    Help will be appreciated.
    Many thanks,
    Neha
    Edited by: Neha Nagrani on Jul 7, 2008 11:46 AM

    Hi Neha,
    Write a Small Report as Folows:
    1.  Create your XMl payload of Type xSTRING.
    2.  Call the method EXECUTE
    Place a Breakpoint on the method. and then keep debugging inside.
    the SetParamter method is obviously called from inside.
    This is the Simplesrt Solution.
    Reward points if useful
    Regards,
    Abhishek

  • Code insert in ABAP program

    Hi all,
    How can i insert a single line of code in background? This needs to be done for thousands of objects. Also, we need to capture all the changes in a single TR. Is there is any automation program available to update these objects.
    Thanks,
    Stanley
    Moderator warning - Please be aware of the potential danger such a solution can pose.
    Message was edited by: Suhas Saha

    There are a number of statements available for dynamic programming that permit you to read programs into an internal table, change the internal table and write the programs back. You only need to read the ABAP help to find them.
    You must ensure safety and that you test on a sandbox system first. A program such as you suggest must never be available in production. It must be coded to prevent changes being made to any program outside the customer namespace.
    There are various function modules, easily found, that will allow the changes to be stored in a transport.
    A common requirement is to add code to all programs that gives information about their use. Such a requirement is easily met by the source code coverage analyser (SCOV) which has a counterpart (UPL or something, or SCOV-lite) that can be run in production without affecting performance.
    If this isn't your requirement, then perhaps if you shared it, we'd be able to come up with a solution that doesn't require automatic code replacement and all the risk that entails.

  • Generation of program code for the ABAP Query

    Dear all,
    In the creation of the ABAP query, in the final step of SQ01, Query- more functions- generate program is made.
    Why the program code is generated for the ABAP query? please  give the logical explaination for the same.
    Thanks and Regards,
    Prash

    Prash,
    a) Do you mean Program code does not have significance in query creation?
    No it does not mean this.  All queries run based on an ABAP program.  In the standard query editing process, when you save and execute the query, you will automatically re-build the existing ABAP program as necessary.  You do not need, though, to execute the menu steps you outlined in order to build, maintain, or execute the query.  It is only there for special purposes, as outlined above by Jürgen
    b) Can we see the program code generated in any transaction?
    From any screen, System > Status.  Place your cursor on the field in "Program (screen)".  Double click.
    Rgds,
    DB49

  • Calling Java code from Webdynpro Abap UI

    Hi All,
    Can anybody tell me, How to make calls to java code on a button click from webdynpro ABAP UI ?
    Thanks in Advance.
    Jenish .V. Joy

    Hi Jenish,
    As I am new to WebDynpro for ABAP I could not help you out exactly.But See this link which will help you to create applications in WebDynpro by using ABAP language.
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?
    rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
    If you get any answer for your question let me know.
    Regards,
    Karthick K Eswaran

  • Bar Code Reading in ABAP, through handheld scanner or say Barcode Reader

    HI,
    I want to scan the bar code label through the bar code reader, and get the bar code
    no in sap abap.
    Please let me know what settings and coding needs to be done to get the bar code
    no that is scanned.
    PLease let me know how i should go about it

    Hi Niranjan,
    There are a couple of third-party tools which can directly read the data from the barcode and you can use it in the ABAP program.
    Alternatively create a dialog screen. USe the barcode scanner and get the data as an input parameter and based on the input parameter do what ever validation you require and then based on the output of the validation trigger your relevant processing.
    Cheers
    VJ

  • Can we assign Transaction code to created  ABAP Query of  SQ01

    Hi ,
    Friends I want to run the abap query assigning t.code to it .. i will be thankfull if any body give me the steps or remedy .
    thanks

    Hi you there.... you can try this
    1) create an abap report with the following source code
    REPORT ZRUN_QUERY .
                          DECLARACIÓNES                                    *
    DATA:
    REPORTNAME LIKE AQADEF-PGNAME.
    PANTALLA DE SELECCION                                                *
    SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-001.
      SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
      PARAMETERS: P_BGNAME LIKE AQADEF-BGNAME OBLIGATORY,
                  P_QUNAME LIKE AQADEF-QUNAME OBLIGATORY.
      SELECTION-SCREEN END   OF BLOCK B1.
    SELECTION-SCREEN END   OF BLOCK B0.
    CUERPO DEL PROGRAMA                                                 *
    CALL FUNCTION 'RSAQ_REPORT_NAME'
         EXPORTING
              WORKSPACE  = SPACE
              USERGROUP  = P_BGNAME
              QUERY      = P_QUNAME
         IMPORTING
             REPORTNAME = REPORTNAME.
    CALL FUNCTION 'RSAQ_SUBMIT_QUERY_REPORT'
         EXPORTING
              QUERYREPORT       = REPORTNAME
              VARIANTE          = SPACE
        EXCEPTIONS
             ONLY_WITH_VARIANT = 1
             VARIANT_NOT_EXIST = 2
             OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    2) Create a transaction for this program
    3) Create a parameter transaction and execute this report passing by parameter the usergroup and Query, then, the program will automatically solve the program name and execute it.
    Regards,
    Daniel

Maybe you are looking for

  • Report and BAPI , Scheduling Problem

    Hi Gurus,   I'm having a problem, I've a query/report that should be executed every 2 wed of the Month and A BAPI is associated to the query,and It's not working properly .it's developed by some other developer went to TCode RSCRM_BAPI,RSRTRACE,MDXTE

  • DB Read error from UCCX Script

    Hi All, We are running uccx 7.0. Trying to return data from DB using stored procedure from the uccx script. We are able to run this when we pass explicit value instead of variable ANI. But whenever we provide variable ANI, we get below error: SQL sta

  • App Store-password request redundancy

    Anyone have an issue with the App Store in that it requests you enter my password each time you access the store?  This happens each time, irregardless if you are making a purchase or not.  In some cases it will ask it will request 2 or 3 times...  T

  • OWB Expert - Insert Operator in a mapping - To Share

    Hi All, Designed an expert to insert one of the following operators (aggregator, set_operation, deduplicator, expression, joiner, splitter, sorter, filter) anywhere in a mapping, if logically possible. Expert retains all the connections on insertion

  • Trusted sites

    I want to add a trusted site. How do I do that?