SRM 7.0 BADI Define Agents-- How to use type /sapsrm/t_wf_area_entity

Hi Experts,
I'm using SRM 7.0. When implementing BADI /SAPSRM/BADI_DET_AG (Define the agents of  procsess controlled workflow), I created the sub-class of interface /SAPSRM/IF_WF_AREA to develop my won logic in method GET_RESPONSIBLE_APPROVERS.
I want use the data in workflow container, seems the method GET_AREA_ENTITY_IDS of /SAPSRM/IF_WF_AREA  can provide a pointer which type is /sapsrm/t_wf_area_entity and point workflow area.
My question is how to use this pointer (or how to use the type /sapsrm/t_wf_area_entity )? Many thanks.
PS. I found some example code delivered by sap, but i want know the full structure which /sapsrm/t_wf_area_entity point. Below code for your reference:
METHOD /sapsrm/if_wf_area~get_responsible_approvers.
  DATA lt_area_entity_id TYPE /sapsrm/t_wf_area_entity_id.
  DATA lr_area_entity_id TYPE REF TO /sapsrm/wf_area_entity_id.
  DATA ls_actor_id       TYPE swhactor.
  DATA lt_approver       TYPE /sapsrm/t_wf_approver.
  FIELD-SYMBOLS: <ls_agent_id> TYPE /sapsrm/s_wf_approver.
  lt_area_entity_id = me->/sapsrm/if_wf_area~get_area_entity_ids( ).
  LOOP AT lt_area_entity_id REFERENCE INTO lr_area_entity_id.
    ASSIGN lr_area_entity_id->* TO <ls_agent_id> CASTING.
    TRY.
        ls_actor_id-otype = <ls_agent_id>-approver_ot.
        ls_actor_id-objid = <ls_agent_id>-approver_id.
        lt_approver = /sapsrm/cl_wf_config_user=>get_manager_list( ls_actor_id ).
        APPEND LINES OF lt_approver TO rt_approver.
      CATCH /sapsrm/cx_wf_error /sapsrm/cx_wf_abort.
        CONTINUE.
    ENDTRY.
  ENDLOOP.
ENDMETHOD.

Hi Darcy,
You can also use FM SAP_WAPI_READ_CONTAINER to read workflow container values.
Please state if you have some other specific requierment.
Regards,
Saumya

Similar Messages

  • How to use TYPE addition with the OPEN DATASET ?

    Hi,
    How to use TYPE addition with the OPEN DATASET and what is the use ?
    For Example:
    OPEN DATASET 'test.dat'
      TYPE 'lrecl=80, blksize=8000, recfm=FB'
      FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    Also, if I wish to do the same for a .CSV file how can we do it.
    Thanks,
    -Sid

    Hi,
    OPEN DATASET 'test.dat'
      TYPE 'lrecl=80, blksize=8000, recfm=FB'
      FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
    For more information press F1 on OPEN DATASET.
    Thanks

  • How to use type cast change string to number(dbl)?can it work?

    how to use type cast change string to number(dbl)?can it work?

    Do you want to Type Cast (function in the Advanced >> Data Manipulation palette) or Convert (functions in the String >> String/Number Conversion palette)?
    2 simple examples:
    "1" cast as I8 = 49 or 31 hex.
    "1" converted to decimal = 1.
    "20" cast as I16 = 12848 or 3230 hex.
    "20" converted to decimal = 20.
    Note that type casting a string to an integer results in a byte by byte conversion to the ASCII values.
    32 hex is an ASCII "2" and 30 hex is an ASCII "0" so "20" cast as I16 becomes 3230 hex.
    When type casting a string to a double, the string must conform the the IEEE 32 bit floating point representation, which is typically not easy to enter from the keyboard.
    See tha attached LabView 6.1 example.
    Attachments:
    TypeCastAndConvert.vi ‏34 KB

  • MAX(SummaryNum) +1 bad idea, but how to use sequence part composite column

    Hi,
    My relational mode is as follows
    Policy (policynum PK) has 1:M with Summary (policynum FK, SummaryNum part of PK, other columns part of PK)
    Basically for each policy users can enter notes with SummaryNum 1, 2, 3, 4.... These numbers are shown to the user for tracking purpose. I need to make sure summary notes for EACH policy start with 1 (cannot really use sequence in the table in the strictest sense) and are incremented by 1. The current Oracle form basically creates the next highest possible value of SummaryNum by adding one to the currently available highest value. In brief, it is like a sequence number for summaries of a particular policy in the summary table.
    PRE-INSERT
    SELECT MAX(SummaryNum ) + 1
    FROM Summary
    I am trying to replicate this in ADF BC (using 11g) and know that not using sequencing and adding one to get the next number is a very bad idea due to concurrency challenges (transactional ACID properties). The reasons are as follows.
    •     Using MAX(policy_memo_seq_num) + 1 is not scalable,
    •     It will lead to duplicates in a multi-user environment, whether ADF BC, Oracle Forms, or any other technology
    I also know how to use create a sequence in db, a related trigger, and then set the attribute in EO properties as DBSequence. My challenge is that since SummaryNum is not a primary key, and instead is part of a composite key in my case, how do I make sure that summary notes for EACH policy start with 1 in the Summary Table.
    I appears that i cannot really use sequence in the table in the strictest sense as this will mean that for policies the summaryNum will start from the next available sequence number, but what i really want is to have it start by one for all policies.*
    I would appreciate any help.
    Thanks,

    Not sure if there is a better way, but here is one way. Let's say your table was like this:
        SQL> desc versioned_item
         Name         Null?    Type
         ID           NOT NULL NUMBER
         VERSION      NOT NULL NUMBER
         DESCRIPTION           VARCHAR2(20)and lets say your data looked like this:
        SQL> select * from versioned_item order by id, version
                ID    VERSION DESCRIPTION
              1001          1 Item 1001
              1001          2 Item 1001
              1001          3 Item 1001
              1002          1 Item 1002
              1002          2 Item 1002
              1003          1 Item 1003To select only the rows for the max-version-id, you could do this:
        select id, version,description
        from versioned_item
        where (id,version) in (select id,max(version) from versioned_item group by id)
        order by id
                ID    VERSION DESCRIPTION
              1001          3 Item 1001
              1002          2 Item 1002
              1003          1 Item 1003To capture this as a view object, you'd only just need to paste in the WHERE clause above into the Where clause box of the view object. No need to use expert-mode since you're not changing the select list or from clause.

  • I m a insurance agent how to use my company product sales illustration program

    How to use my company product sales illustration program ?

    Who knows? XD
    You haven't mentioned anything about the program.
    Why don't you ask your company for training? (if it is an inhouse developed program).
    Otherwise, go to the website for the program. Use GooGle!

  • How to use Type Casting in JSF Expression Language

    I have an attribute CategoryId in my VO of type oracle.jbo.domain.Number. I am trying to use the expression of Boolean item in JSF as #{row.CategoryId != 4}
    Here is the JSF code:
                          <af:column id="s141NewItem3Col" noWrap="true" width="100"
                                     rowHeader="false">
                            <f:facet name="header">
                              <af:outputLabel value="CAtIDDeq4" showRequired="false"
                                              id="ol18"/>
                            </f:facet>
                            <af:inputText id="s141NewItem3"
                                          value="#{row.CategoryId != 4}"
                                          label="CAtIDDeq4" required="false"
                                          readOnly="#{((pageFlowScope.ContractRightCategoriesTable.newRow) and (!(jhsUserRoles['RM, ADMIN, AllButTitl, AllButAdmn']))) or ((!pageFlowScope.ContractRightCategoriesTable.newRow) and (!(jhsUserRoles['RM, ADMIN, AllButTitl, AllButAdmn'])))}"></af:inputText>
                          </af:column>I am getting the run time exception as "Can not convert 4 of type class oracle.jbo.domain.Number to class java.lang.Long".
    I am wondering how the row.CategoryId is treated as Long?. PLease advise. Also, will I be able to use type casting expressions in JSF Expression Language?
    Thanks, Pradeep

    use attributeValue
    Try *#{row.bindings.CategoryId.attributeValue != 4}* ?
    Check this thread for details which discusses about the same:
    El expression to disable  or enable
    Thanks,
    Navaneeth

  • How to use %Type declaration with table residing in a different database

    How can I use the %TYPE declaration if the table is from a different database.
    E.g
    v_business_unit ps_jrnl.header.business_unit%TYPE;
    In the above declaration statement,the table 'ps_jrnl_header' resides in a different database(Database A) from the one I am currently in( Database B).(This is because data needs to be extracted from Database A into Database B).

    1. Create a database link to the other database (this probably already exists since your proc is interacting with that database)
    2. Create a synonym for the table in the other database
    create synonym foo for ps_jrnl.header@database_a;3. Reference the synonym in your variable declaration:
    v_business_unit  foo.business_unit%TYPE;

  • How to use Types structure in smartform layout

    Hi Experts,
    i have a requirement in smartforms. i have a z-structure having some fields. those fields
    should be in the smartform output when we run the print program. This is working fine.
    But i need to add 2 more fields to the existing z-structure. For this, i created a types
    structure in the print program and added the 2 new fields and created internal tables from
    that structure.
    My question is how to pass this types strucure to the smartform layout. i tried to add the
    structure in the tables option of the form interface.
    I get the error "Form Interface - Only table types may be used as the reference type for a table parameter".
    i also tried to declare the types structure. Please advise.

    Hi,
    you create structure in se11 and select structure radio button.
    In the smart form give like as
    Form interface---->tables (tab)
    parameter name ---I_FINAL(inernal table)
    type assignment---LIKE
    Associated type---ZXXXXX (structure name) 
    For declarations of workarea:
    Global definitons----->Global data
    Variable name----WA_FINAL
    Type assignment---TYPE
    Associated type---ZXXXXX
    you declared as of above
    I hope it will helpful you
    Regards
    Bhupal

  • How to use type, packages, functions, and procedures in another schema ?

    I have two target schema in one OWB project, such as A and B. In a mapping of A, I would like to use some types, packages, functions, and procedures from B. I have tried the method of synonym as suggested, but I could not find the metadata of these when importing ... The only type of synonym I can import is the synonym for table. Is there a bug for synonym?
    If I cannot use synonym for this issue, is there another way to solve the problem?

    Now, in some instances you will absolutely need to create the second module as Carsten describes, however it should also be noted that you can reference objects in things like Expressions even if you have not loaded up the metadata. It is only when you need strong binding that it becomes neccessary to import objects. For everything else, as long as the reference will resolve at compile-time then you are good to go.
    For example, I have a function in one target schema (S1) and a private synonym to it in another(s2). A mapping in the S2 schema has an expression object that uses the synonym to the function in the expression property for a couple of the output attirbutes. The synonym has not been loaded into metadata - indeed OWB has no knowledge of its existance. But it resolves at compile time so the mapping validates and generates successfully.
    Mike

  • How to find BADI Defination and Implemantation from Method of BADI?

    HI,
       can anyone tell me that how to find BADI Defination and Implemantation from Method of BADI?

    & Report  ZPJA_PM002 (V2)                                            &
    & Text Elements:                                                     &
    & P_DEVC Show user-exits from development class                      &
    & P_LIMIT Limit submit program selection                             &
    & P_FUNC Show function modules                                       &
    & P_SUBM Show submit programs                                        &
    & S01    Selection data (TCode takes precedence  over program name)  &
    report  zpja_pm002
      no standard page heading
      line-size 158.
    *tables: enlfdir.     "Additional Attributes for Function Modules
    data: tabix      like sy-tabix,
          w_linnum   type i,
          w_off      type i,
          w_index    like sy-tabix,
          w_include  like trdir-name,
          w_prog     like trdir-name,
          w_incl     like trdir-name,
          w_area     like rs38l-area,
          w_level,
          w_str(50)  type c,
          w_funcname like tfdir-funcname.
    constants: c_fmod(40) type c value 'Function modules selected: ',
               c_subm(40) type c value 'Submit programs selected: ',
               c_col1(12) type c value 'Enhanmt Type',
               c_col2(40) type c value 'Enhancement',
               c_col3(30) type c value 'Program/Include',
               c_col4(20) type c value 'Enhancement Name',
               c_col5(40) type c value 'Enhancement Description'.
    Work Areas: ABAP Workbench
    data: begin of wa_d010inc.
    data: master type d010inc-master.
    data: end of wa_d010inc.
    data: begin of wa_tfdir.
    data: funcname type tfdir-funcname,
          pname    type tfdir-pname,
          include  type tfdir-include.
    data: end of wa_tfdir.
    data: begin of wa_tadir.
    data: devclass type tadir-devclass.
    data: end of wa_tadir.
    data: begin of wa_tstc.
    data: pgmna type tstc-pgmna.
    data: end of wa_tstc.
    data: begin of wa_tstcp.
    data: param type tstcp-param.
    data: end of wa_tstcp.
    data: begin of wa_enlfdir.
    data: area type enlfdir-area.
    data: end of wa_enlfdir.
    Work Areas: BADIs
    data: begin of wa_sxs_attr.
    data: exit_name type sxs_attr-exit_name.
    data: end of wa_sxs_attr.
    data: begin of wa_sxs_attrt.
    data: text type sxs_attrt-text.
    data: end of wa_sxs_attrt.
    Work Areas: Enhancements
    data: begin of wa_modsap.
    data: member type modsap-member.
    data: end of wa_modsap.
    data: begin of wa_modsapa.
    data: name type modsapa-name.
    data: end of wa_modsapa.
    data: begin of wa_modsapt.
    data: modtext type modsapt-modtext.
    data: end of wa_modsapt.
    Work Areas: Business Transaction Events
    data: begin of wa_tbe01t.
    data: text1 type tbe01t-text1.
    data: end of wa_tbe01t.
    data: begin of wa_tps01t.
    data: text1 type tps01t-text1.
    data: end of wa_tps01t.
    user-exits
    types: begin of t_userexit,
          type(12) type c,
          pname    like trdir-name,
          txt(300),
          level    type c,
          modname(30) type c,
          modtext(40) type c,
    end of t_userexit.
    data: i_userexit type standard table of t_userexit with header line.
    Function module developmnet classes
    types: begin of t_devclass,
          clas   like trdir-clas,
    end of t_devclass.
    data: i_devclass type standard table of t_devclass with header line.
    Submit programs
    types: begin of t_submit,
          pname     like trdir-name,
          level,
          done,
    end of t_submit.
    data: i_submit type standard table of t_submit with header line.
    Source code
    types: begin of t_sourcetab,                        "#EC * (SLIN lügt!)
            line(200),                                  "#EC * (SLIN lügt!)
          end of t_sourcetab.                           "#EC * (SLIN lügt!)
    data: sourcetab type standard table of t_sourcetab with header line.
    data c_overflow(30000) type c.
    Description of an ABAP/4 source analysis token
    data: i_stoken type standard table of stokex with header line.
    data wa_stoken like i_stoken.
    Description of an ABAP/4 source analysis statement
    data: i_sstmnt type standard table of sstmnt with header line."#EC
    keywords for searching ABAP code
    types: begin of t_keywords,
          word(30),
    end of t_keywords.
    data: keywords type standard table of t_keywords with header line.
    function modules within program
    types: begin of t_fmodule,
          name   like rs38l-name,
          pname  like trdir-name,
          pname2 like trdir-name,
          level,
          bapi,
          done,
    end of t_fmodule.
    data: i_fmodule type standard table of t_fmodule with header line.
    & Selection Options                                                  &
    selection-screen begin of block selscr1 with frame title text-s01.
    parameter: p_pname like trdir-name memory id rid,
               p_tcode like syst-tcode,
               p_limit(4) type n default 100,
               p_devc  like rihea-dy_ofn default ' ',
               p_func  like rihea-dy_ofn default ' ',
               p_subm  like rihea-dy_ofn default ' '.
    selection-screen end of block selscr1.
    & START-OF-SELECTION                                                 &
    start-of-selection.
      if p_pname is initial and p_tcode is initial.
        message e008(hrfpm).  "Make entry on the selection screen
        stop.
      endif.
    ensure P_LIMIT is not zero.
      if p_limit = 0.
        p_limit = 1.
      endif.
      perform data_select.
      perform get_submit_data.
      perform get_fm_data.
      perform get_additional_data.
      perform data_display.
    & Form DATA_SELECT                                                   &
    form data_select.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get programs/includes'       "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
    determine search words
      keywords-word = 'CALL'.
      append keywords.
      keywords-word = 'FORM'.
      append keywords.
      keywords-word = 'PERFORM'.
      append keywords.
      keywords-word = 'SUBMIT'.
      append keywords.
      keywords-word = 'INCLUDE'.
      append keywords.
      if not p_tcode is initial.
    get program name from TCode
        select single pgmna from tstc into wa_tstc-pgmna
                     where tcode eq p_tcode.
        if not wa_tstc-pgmna is initial.
          p_pname = wa_tstc-pgmna.
    TCode does not include program name, but does have refereve TCode
        else.
          select single param from tstcp into wa_tstcp-param
                       where tcode eq p_tcode.
          if sy-subrc = 0.
            check wa_tstcp-param(1)   = '/'.
            check wa_tstcp-param+1(1) = '*'.
            if wa_tstcp-param ca ' '.
            endif.
            w_off = sy-fdpos + 1.
            subtract 2 from sy-fdpos.
            if sy-fdpos gt 0.
              p_tcode = wa_tstcp-param+2(sy-fdpos).
            endif.
            select single pgmna from tstc into wa_tstc-pgmna
                   where tcode eq p_tcode.
            p_pname = wa_tstc-pgmna.
            if sy-subrc <> 0.
              message e110(/saptrx/asc) with 'No program found for: '
    p_tcode."#EC NOTEXT
              stop.
            endif.
          else.
            message e110(/saptrx/asc) with 'No program found for: ' p_tcode.
    "#EC NOTEXT
            stop.
          endif.
        endif.
      endif.
    Call customer-function aus Program coding
      read report p_pname into sourcetab.
      if sy-subrc > 0.
        message e017(enhancement) with p_pname raising no_program."#EC *
      endif.
      scan abap-source sourcetab tokens     into i_stoken
                                 statements into i_sstmnt
                                 keywords   from keywords
                                 overflow into c_overflow
                                 with includes.
                                 WITH ANALYSIS.
      if sy-subrc > 0. "keine/syntakt. falsche Ablauflog./Fehler im Skanner
        message e130(enhancement) raising syntax_error.         "#EC *
      endif.
    check I_STOKEN for entries
      clear w_linnum.
      describe table i_stoken lines w_linnum.
      if w_linnum gt 0.
        w_level = '0'.
        w_prog = ''.
        w_incl = ''.
        perform data_search tables i_stoken using w_level w_prog w_incl.
      endif.
    endform.                        "DATA_SELECT
    & Form GET_FM_DATA                                                   &
    form get_fm_data.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get function module data'    "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
    Function module data
      sort i_fmodule by name.
      delete adjacent duplicates from i_fmodule comparing name.
      loop at i_fmodule where done  ne 'X'.
        clear:   i_stoken, i_sstmnt, sourcetab, wa_tfdir, w_include .
        refresh: i_stoken, i_sstmnt, sourcetab.
        clear wa_tfdir.
        select single funcname pname include from tfdir into wa_tfdir
                                where funcname = i_fmodule-name.
        check sy-subrc = 0.
        call function 'FUNCTION_INCLUDE_SPLIT'
          exporting
            program = wa_tfdir-pname
          importing
            group   = w_area.
        concatenate 'L' w_area 'U' wa_tfdir-include into w_include.
        i_fmodule-pname  = w_include.
        i_fmodule-pname2 = wa_tfdir-pname.
        modify i_fmodule.
        read report i_fmodule-pname into sourcetab.
        if sy-subrc = 0.
          scan abap-source sourcetab tokens     into i_stoken
                                     statements into i_sstmnt
                                     keywords   from keywords
                                     with includes.
          if sy-subrc > 0.
            message e130(enhancement) raising syntax_error.
          endif.
    check i_stoken for entries
          clear w_linnum.
          describe table i_stoken lines w_linnum.
          if w_linnum gt 0.
            w_level = '1'.
            w_prog  = i_fmodule-pname2.
            w_incl =  i_fmodule-pname.
            perform data_search tables i_stoken using w_level w_prog w_incl.
          endif.
        endif.
      endloop.
      if p_devc = 'X'.
        loop at i_fmodule.
          clear: wa_tadir, wa_enlfdir.
          select single area from enlfdir into wa_enlfdir-area
                                where funcname = i_fmodule-name.
          check not wa_enlfdir-area is initial.
          select single devclass into wa_tadir-devclass
                          from tadir where pgmid    = 'R3TR'
                                       and object   = 'FUGR'
                                       and obj_name = wa_enlfdir-area.
          check not wa_tadir-devclass is initial.
          move wa_tadir-devclass to i_devclass-clas.
          append i_devclass.
          i_fmodule-done = 'X'.
          modify i_fmodule.
        endloop.
        sort i_devclass.
        delete adjacent duplicates from i_devclass.
      endif.
    endform.                        "GET_FM_DATA
    & Form GET_SUBMIT_DATA                                               &
    form get_submit_data.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get submit data'             "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
      sort i_submit.
      delete adjacent duplicates from i_submit comparing pname.
      w_level = '0'.
      loop at i_submit where done ne 'X'.
        clear:   i_stoken, i_sstmnt, sourcetab.
        refresh: i_stoken, i_sstmnt, sourcetab.
        read report i_submit-pname into sourcetab.
        if sy-subrc = 0.
          scan abap-source sourcetab tokens     into i_stoken
                                     statements into i_sstmnt
                                     keywords   from keywords
                                     with includes.
          if sy-subrc > 0.
           message e130(enhancement) raising syntax_error.
            continue.
          endif.
    check i_stoken for entries
          clear w_linnum.
          describe table i_stoken lines w_linnum.
          if w_linnum gt 0.
            w_prog  = i_submit-pname.
            w_incl = ''.
            perform data_search tables i_stoken using w_level w_prog w_incl.
          endif.
        endif.
    restrict number of submit program selected for processing
        describe table i_submit lines w_linnum.
        if w_linnum ge p_limit.
          w_level = '1'.
        endif.
        i_submit-done = 'X'.
        modify i_submit.
      endloop.
    endform.                       "GET_SUBMIT_DATA
    & Form DATA_SEARCH                                                   &
    form data_search tables p_stoken structure stoken
                            using p_level p_prog p_incl.
      loop at p_stoken.
        clear i_userexit.
        tabix = sy-tabix + 1.
        i_userexit-level = p_level.
        if i_userexit-level = '0'.
          if p_incl is initial.
            i_userexit-pname = p_pname.
          else.
            concatenate  p_pname '/' p_incl into i_userexit-pname.
          endif.
        else.
          if p_incl is initial.
            i_userexit-pname = p_prog.
          else.
            concatenate  p_prog '/' p_incl into i_userexit-pname.
          endif.
        endif.
    Include
        if p_stoken-str eq 'INCLUDE'.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
          check not wa_stoken-str cs 'STRUCTURE'.
          check not wa_stoken-str cs 'SYMBOL'.
          read table i_submit with key pname = wa_stoken-str.
          if sy-subrc <> 0.
            i_submit-pname = wa_stoken-str.
            i_submit-level = p_level.
            append i_submit.
          endif.
        endif.
    Enhancements
        if p_stoken-str eq 'CUSTOMER-FUNCTION'.
          clear w_funcname.
          read table p_stoken index tabix.
          translate p_stoken-str using ''' '.
          condense p_stoken-str.
          if p_prog is initial.
            concatenate 'EXIT' p_pname p_stoken-str into w_funcname
                         separated by '_'.
          else.
            concatenate 'EXIT' p_prog p_stoken-str into w_funcname
                   separated by '_'.
          endif.
          select single member from modsap into wa_modsap-member
                where member = w_funcname.
          if sy-subrc = 0.   " check for valid enhancement
            i_userexit-type = 'Enhancement'.
            i_userexit-txt  = w_funcname.
            append i_userexit.
          else.
            clear wa_d010inc.
            select single master into wa_d010inc-master
                  from d010inc
                     where include = p_prog.
            concatenate 'EXIT' wa_d010inc-master p_stoken-str into
    w_funcname
                   separated by '_'.
            i_userexit-type = 'Enhancement'.
            i_userexit-txt  = w_funcname.
          endif.
        endif.
    BADIs
        if p_stoken-str cs 'cl_exithandler='.
          w_index = sy-tabix + 4.
          read table p_stoken index w_index into wa_stoken.
          i_userexit-txt = wa_stoken-str.
          replace all occurrences of '''' in i_userexit-txt with space.
          i_userexit-type = 'BADI'.
          append i_userexit.
        endif.
    Business transaction events
        if p_stoken-str cs 'OPEN_FI_PERFORM'.
          i_userexit-type = 'BusTrEvent'.
          i_userexit-txt = p_stoken-str.
          replace all occurrences of '''' in i_userexit-txt with space.
          i_userexit-modname =  i_userexit-txt+16(8).
          case i_userexit-txt+25(1).
            when 'E'.
              clear wa_tbe01t.
              select single text1 into wa_tbe01t-text1 from tbe01t
                               where event = i_userexit-txt+16(8)
                                 and spras = sy-langu.
              if wa_tbe01t-text1 is initial.
                i_userexit-modtext = ''.            "#EC NOTEXT
              else.
                i_userexit-modtext = wa_tbe01t-text1.
              endif.
              i_userexit-modname+8 = '/P&S'.                    "#EC NOTEXT
            when 'P'.
              clear wa_tps01t.
              select single text1 into wa_tps01t-text1 from tps01t
                               where procs = i_userexit-txt+16(8)
                                 and spras = sy-langu.
              i_userexit-modtext = wa_tps01t-text1.
              i_userexit-modname+8 = '/Process'.
          endcase.
          append i_userexit.
        endif.
    Program exits
        if p_stoken-str cs 'USEREXIT_'.
          i_userexit-type = 'Program Exit'.
          i_userexit-txt = p_stoken-str.
          replace all occurrences of '''' in i_userexit-txt with space.
          append i_userexit.
        endif.
    Submit programs
        if p_stoken-str cs 'SUBMIT'.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          check not p_stoken-str cs '_'.   " ensure not SUBMIT_XXX
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
          check not wa_stoken-str cs '_'.   " ensure not SUBMIT_XXX
          replace all occurrences of '''' in wa_stoken-str with space.
          read table i_submit with key pname = wa_stoken-str.
          if sy-subrc <> 0.
            i_submit-pname = wa_stoken-str.
            i_submit-level = p_level.
            append i_submit.
          endif.
        endif.
    Perform routines (which reference external programs)
        if p_stoken-str cs 'PERFORM'.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
          if not wa_stoken-ovfl is initial.
            w_off = wa_stoken-off1 + 10.
            w_str = c_overflow+w_off(30).
            find ')' in w_str match offset w_off.
            w_off = w_off + 1.
            wa_stoken-str = w_str(w_off).
          endif.
          check wa_stoken-str cs '('.
          w_off = 0.
          while sy-subrc  = 0.
            if wa_stoken-str+w_off(1) eq '('.
              replace section offset w_off length 1 of wa_stoken-str with ''
              replace all occurrences of ')' in wa_stoken-str with space.
              read table i_submit with key pname = wa_stoken-str.
              if sy-subrc <> 0.
                i_submit-pname = wa_stoken-str.
                append i_submit.
              endif.
              exit.
            else.
              replace section offset w_off length 1 of wa_stoken-str with ''
              shift wa_stoken-str left deleting leading space.
            endif.
          endwhile.
        endif.
    Function modules
        if p_stoken-str cs 'FUNCTION'.
          clear i_fmodule.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
         if wa_stoken-str cs 'WF_'.
         if wa_stoken-str cs 'IF_'.
           break-point.
         endif.
          if wa_stoken-str cs 'BAPI'.
            i_fmodule-bapi = 'X'.
          endif.
          replace first occurrence of '''' in wa_stoken-str with space.
          replace first occurrence of '''' in wa_stoken-str with space.
          if sy-subrc = 4.   " didn't find 2nd quote (ie name truncated)
            clear wa_tfdir.
            concatenate wa_stoken-str '%' into wa_stoken-str.
            select single funcname into wa_tfdir-funcname from tfdir
                         where funcname like wa_stoken-str.
            if sy-subrc = 0.
              i_fmodule-name = wa_tfdir-funcname.
            else.
              continue.
            endif.
          else.
            i_fmodule-name = wa_stoken-str.
          endif.
          i_fmodule-level = p_level.
          append i_fmodule.
        endif.
      endloop.
    endform.                        "DATA_SEARCH
    & Form GET_ADDITIONAL_DATA                                           &
    form get_additional_data.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get additional data'         "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
      loop at i_userexit.
    Enhancement data
        if  i_userexit-type cs 'Enh'.
          clear: wa_modsapa.
          select single name into wa_modsapa-name from modsap
                            where member = i_userexit-txt.
          check sy-subrc = 0.
          i_userexit-modname = wa_modsapa-name.
          clear wa_modsapt.
          select single modtext into wa_modsapt-modtext from modsapt
                            where name = wa_modsapa-name
                                         and sprsl = sy-langu.
          i_userexit-modtext = wa_modsapt-modtext.
        endif.
    BADI data
        if  i_userexit-type eq 'BADI'.
          clear wa_sxs_attr.
          select single exit_name into wa_sxs_attr-exit_name from sxs_attr
                                        where exit_name = i_userexit-txt.
          if sy-subrc = 0.
            i_userexit-modname = i_userexit-txt.
          else.
            i_userexit-modname = 'Dynamic call'.                "#EC NOTEXT
          endif.
          clear wa_sxs_attrt.
          select single text into wa_sxs_attrt-text from sxs_attrt
                                         where exit_name =
    wa_sxs_attr-exit_name
                                           and sprsl = sy-langu.
          i_userexit-modtext = wa_sxs_attrt-text.
        endif.
        modify i_userexit.
      endloop.
    get enhancements via program package
      clear wa_tadir.
      select single devclass into wa_tadir-devclass from tadir
                                 where pgmid    = 'R3TR'
                                   and object   = 'PROG'
                                   and obj_name = p_pname.
      if sy-subrc = 0.
        clear: wa_modsapa, wa_modsapt.
        select name from modsapa into wa_modsapa-name
                              where devclass = wa_tadir-devclass.
          select single modtext from modsapt into wa_modsapt-modtext
                              where name = wa_modsapa-name
                                and sprsl = sy-langu.
          read table i_userexit with key modname = wa_modsapa-name.
          if sy-subrc <> 0.
            i_userexit-modtext = wa_modsapt-modtext.
            i_userexit-type = 'Enhancement'.                    "#EC NOTEXT
            i_userexit-modname  = wa_modsapa-name.
            i_userexit-txt = 'Determined from program DevClass'."#EC NOTEXT
            i_userexit-pname = 'Unknown'.                       "#EC NOTEXT
            append i_userexit.
          endif.
        endselect.
      endif.
    endform.                        "GET_ADDITIONAL_DATA
    & Form DATA_DISPLAY                                                  &
    form data_display.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Prepare screen for display'  "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
      sort i_userexit by type txt modname.
      delete adjacent duplicates from i_userexit comparing txt modname.
    format headings
      write: 'Enhancements from main program'.                  "#EC NOTEXT
      write: /.
      uline.
      format color col_heading.
      write: /    sy-vline,
             (12) c_col1,                    "Enhanmt Type
                  sy-vline,
             (40) c_col2,                    "Enhancement
                  sy-vline,
             (30) c_col3,                    "Program/Include
                  sy-vline,
             (20) c_col4,                    "Enhancement name
                  sy-vline,
             (40) c_col5,                    "Enhancement description
                  sy-vline.
      format reset.
      uline.
    format lines
      loop at i_userexit.
    set line colour
        case i_userexit-type.
          when 'Enhancement'.
            format color 3 intensified off.
          when 'BADI'.
            format color 4 intensified off.
          when 'BusTrEvent'.
            format color 5 intensified off.
          when 'Program Exit'.
            format color 6 intensified off.
          when others.
            format reset.
        endcase.
        write: / sy-vline,
                 i_userexit-type,
                 sy-vline,
                 i_userexit-txt(40),
                 sy-vline,
                 i_userexit-pname(30),
                 sy-vline,
                 i_userexit-modname(20),
                 sy-vline,
                 i_userexit-modtext(40),
                 sy-vline.
      endloop.
      format reset.
      uline.
    user-exits from development class of function modules
      if p_devc = 'X'.
        write: /.
        write: / 'User-exits from function module development class'."#EC
    *NOTEXT
        write: 157''.
        uline (90).
        write: 157''.
        loop at i_devclass.
          clear wa_modsapa.
          select name from modsapa into wa_modsapa
                       where devclass = i_devclass-clas.
         select single name modtext into corresponding fields of wa_modsapt
                                       from modsapt
                                         where name  = wa_modsapa-name
                                           and sprsl = sy-langu.
            format color 3 intensified off.
            write: / sy-vline,
                     (12) 'Enhancement',
                     sy-vline,
                    wa_modsapa-name,
                    sy-vline,
                    wa_modsapt-modtext,
                    sy-vline.
          endselect.
        endloop.
        uline (90).
        format reset.
      endif.
      describe table i_fmodule lines w_linnum.
      write: / c_fmod , at 35 w_linnum.                         "#EC NOTEXT
      write: 157''.
      if p_func = 'X'.
    display fuction modules used in program
        uline (38).
        write: 157''.
        loop at i_fmodule.
          write: sy-vline,
                 i_fmodule-name,
                 sy-vline,
                 i_fmodule-bapi,
                 sy-vline.
          write: 157''.
        endloop.
        uline (38).
      endif.
      describe table i_submit lines w_linnum.
      write: / c_subm , at 35 w_linnum.                         "#EC NOTEXT
      write: 157''.
      if p_subm = 'X'.
    display submit programs used in program
        uline (44).
        write: 157''.
        loop at i_submit.
          write: sy-vline,
                 i_submit-pname,
                 sy-vline.
          write: 157''.
        endloop.
        uline (44).
      endif.
    issue message with number of user-exits displayed
      describe table i_userexit lines w_linnum.
      message s697(56) with w_linnum.
    endform.                        "DATA_DISPLAY
    reward points if it helps
    gunjan

  • How to use the Include Statement in the BADI

    Dear All,
            I am trying to implement the BADI. So i need to use the Include in the BADI.
    How to use the Include statement in the BADI. I cant able to use it in the Public, Private and protected statement.
    Where should i mention that,,,,
    Thanks
    Yogesh

    Hi Sharat,
      Thanks for your reply.
    I need to use the BADI HRWPC_PCR_APPR_FORM. In which the values are available in the Container. So if i need to use the container values then i need to use that include <cntain>.
    Is there any possible ways to make it.
    Thanks
    Yogesh

  • How can I use a SCH-LC11 device in CHINA which bought from ebay. I am not Verizon customer but I prefer to using your 4G LTE Router . How can I get the unlock code? The device may have a bad ESN but I only use it in CHINA. Kindly looking forward your repl

    How can I use a SCH-LC11 device in CHINA which bought from ebay. I am not Verizon customer but I prefer to using your 4G LTE Router . How can I get the unlock code? The device may have a bad ESN but I only use it in CHINA. Kindly looking forward your reply. Thanks!

    It's good to read Antoniad's post.  It reassures me that I can use my new iPad as an international communication device which is the reason I purchased the thing.  However, I called Verizon today (my provider of cellular data) who told me that I can't just pop in a SIM card as you suggested.  He also said that he was from the "Pre-Pay" division of Verizon and he was certain that I couldn't do what I planned to do.  I was extremely disappointed as I had called Apple prior to buying the iPad and I read the algorhythm on the website for choosing an iPad before purchasing.  Those sources were quite specific and the information seemed clear.  I would be able to use my iPad to communicate through cellular connections while traveling on the road, literally, abroad.  I was told that I could pop in a data card wherever I was, just as you indicated in your message above, and voila I was good to go.  The Verizon rep definitively rained on that parade, but said that I might be able to do this if I have a "Post-Pay" account, a different area of Verizon.  I haven't had the chance to talk to this division yet, so I looked to Apple's Support for answers.  Maybe I will find out that I can use my iPad as an international communication device while traveling on the road afterall, however, it appears I may need a different type of account (Post-Pay), something I was never warned about. Can I switch to this kind of account?  I don't know.  I have to find out.  If you have any information about this issue, it would be good to share since I strongly suspect there are others who bought the iPad for the same purpose that I have.

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • How to use the BADI  WORKORDER_GOODSMVT to meet my requirement?

    Hello Abapers,
    My requirement is I need to display Batch Number in confirmation of production order(co15) which is entered in creation of production order(co01).While debugging the CO15,i got badi as WORKORDER_GOODSMVT.
    I am new to BAdi,HOW to use this badi to meet my requirement.
    Please help for me to solve my problem.
    If any one implemented batch mangement in PP.Please tell the procedure how u achieved?
    waiitng for your favourable replies
    Regards
    Maruthi.

    Hai,
    IN my reuqiremnt,i used GOODS_RECEIPT method to meet my requirement.
    Regards
    Maruthi.K

  • How to use globally defined variable in SQ01

    Hi,
    I have created one InfoSet using SQ02. In that I have declared some Additional Fields. These Additional Fields are of type String , so I have declared thses fields in DATA Section of Code of Infoset as it is not possible to define a custom field of type string.
    Now I have to add these fields to Field Groups, so that I can use them in queries (SQ01). 
    Can anyone plz tell me how to add these fields in Field Groups?
    Thanks.
    Edited by: hrishi_k126 on Sep 23, 2010 9:46 AM

    Hello,
    Please, ask this kind of questions in the e-business forum.
    Francois

Maybe you are looking for

  • How to remove kindlegen plug-in in InddCS5.5

    Once again, I fell for the recommendation to install a third-party plug-in: Amazon kindlegen plug-in for indesign CS5.5. It has caused my INDDCS5.5 to not be able to load. I want to remove this kindlegen plug-in. I saw on one forum (not adobe forum)

  • Album art added via Itunes 'Get Info' not updating on iPhone 5

    Im wanting to use Itunes specifically to add album artwork to my music which is managed manually. With the previous itunes version, it was a case of dragging and dropping a jpeg into the bottom left corner and hey presto! However, now...nothing. Ive

  • Trying to determine the age of a 1242AG access point

    I have an AIR-LAP1242AG-A-K9, serial number FTX1623B0RX. I just need to know how old this unit is. Any idea how I find that info? (I haven't attached it to our Cisco account, so I can't open a TAC for it.) Thanks! Boot Version  12.4.13.0 IOS Version 

  • Does "Location Services" always drain the battery when enabled?

    Hi, I've read lots of things that say if you want to save battery power, disabled "Location Services". I find it annoying that on the odd occasion that I want to use Location Services, say, to find an ATM near where I am, I have to go into settings a

  • Best Views to Lovs

    Dear All sometimes i use View Objects based on EOS to be used in List of values, and sometimes i use View Objects in expert Mode (View Object without EO), which one better any why ? thanks