Help regarding calling BRFPLUS function through ABAP code

Hi,
      I have  a situation where I have to input  data into a BRFPLUS function  as a table (i.e the data is input as select options where list or range of data can be provided).The corresponding output is also in the form a table .I've created this function in BRFPLUS and is working fine .Now I have to call it through ABAP code.Can someone kindly  provide me with the probable code for this scenario.
E.g:
        ZT_MATNR  is the table in brfplus representing the list of MATNR values input along with other such inputs to function module Z_FM
        ZT_ATM   is the  resultant output table  of the function  which contains several fields.
Now I have to call this BRFPLUS function with help of ABAP code.Could someone kindly help.

Hello ,
There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
For your usecase, you should do the following.
        lo_fdt_function         TYPE REF TO if_fdt_function,
        lo_fdt_result           TYPE REF TO if_fdt_result,
* Get function handle
      CALL METHOD lo_fdt_factory->get_function
        EXPORTING
          iv_id       = lv_function_id
        RECEIVING
          ro_function = lo_fdt_function.
where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
*   Set function context
    TRY.
        CALL METHOD lo_fdt_context->set_value
          EXPORTING
            iv_id    =
            ia_value =
This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
* Execute BRFPLUS function
  TRY.
      CALL METHOD lo_fdt_function->process
        EXPORTING
          io_context = lo_fdt_context
        IMPORTING
          eo_result  = lo_fdt_result.
* Get result output
  TRY.
      CALL METHOD lo_fdt_result->get_value
        IMPORTING
          ea_value =
Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
Regards,
Indranil.

Similar Messages

  • Uncaught Exception occured while sending mail through abap code.

    Hi,
    Uncaught Exception occured while sending mail through abap code.Run time Errors "UNCAUGHT_EXCEPTION" occured after excuting the call method  CALL METHOD SEND_REQUEST->SEND( ).kindly help in resolving the issue.

    HI,
    Runtime Error:  UNCAUGHT_EXCEPTION details.
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_ADDRESS_BCS
    Short text
         An exception occurred that was not caught.
    What happened?
         The exception 'CX_ADDRESS_BCS' was raised, but it was not caught anywhere along
         the call hierarchy.
         Since exceptions represent error situations and this error was not
         adequately responded to, the running ABAP program 'SAPLZSEND_MAIL' has to be
         terminated.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_ADDRESS_BCS', was not caught in
        procedure "SEND_MAIL" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        An exception occurred
    How to correct the error
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "UNCAUGHT_EXCEPTION" "CX_ADDRESS_BCS"
        "SAPLZSEND_MAIL" or "LZSEND_MAILU01"
        "ZSEND_EMAIL"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
        (Unconverted)".
        3. If the problem occurs in a problem of your own or a modified SAP
        program: The source code of the program
           In the editor, choose "Utilities->More
        Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "SEND_MAIL" "(FORM)", or its possible occurrence must be declared in the
    RAISING clause of the procedure.
    Please help me to resolve this issue.

  • Triggering Process chains through abap code

    Hi Experts,
    Can you please let me know if it is possible to trigger a BW Process chain using an abap code.
    If yes , kindly let me know the sample code.
    Help done would be appreciated.
    Regards,
    Uday

    Hi Thanks for your reply.
    When I am trying to execute process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chain being executing through one ABAP program using the following code
    CALL FUNCTION 'RSPC_API_CHAIN_SCHEDULE'
    EXPORTING
    I_CHAIN = 'XYZ'. ( Dummy Process chain name)
    While executing this program I am getting following message :
    You can specify the name of the application server here
    on which all jobs in the chain are scheduled
    If you do not specify a name, the jobs from batch
    management are divided between the available servers
    How to avoid this message.
    Can we write any code in the above program to assign any fixed server name so that it will not ask for any server name.
    Your help is much appreciated.

  • How to call a transaction from ABAP code

    Hi everybody,
    How do I run a transaction from my ABAP code?
    For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
    Thanks for the help,
    Roy

    CALL TRANSACTION
    Syntax
    CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
                        | [USING bdc_tab [bdc_options]] }.
    Extras:
    1. ... AND SKIP FIRST SCREEN
    2. ... USING bdc_tab [bdc_options]
    Effect
    The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
    At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
    When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
    If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
    If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
    After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
    Note
    At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
    Addition 1
    ... AND SKIP FIRST SCREEN
    Effect
    This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
    For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
    All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
    If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
    Example
    If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
    DATA: carrid TYPE spfli-carrid,
          connid TYPE spfli-connid.
    SET PARAMETER ID: 'CAR' FIELD carrid,
                      'CON' FIELD connid.
    CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
    Addition 2
    ... USING bdc_tab [bdc_options]
    Effect
    Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
    The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
    Component Description
    PROGRAM Name of the program of the called transaction
    DYNPRO Number of the dynpro to be processed
    DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
    FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
    FVAL Value to be passed to the dynpro field or to the control statement
    Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
    System Fields
    sy-subrc Description
    0 The batch input processing of the called transaction was successful.
    < 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
    1001 Error in batch input processing.
    Note
    Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
    Example
    Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
    DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLSEOD'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
    bdcdata_wa-fval = class_name.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=CIDI'.
    APPEND bdcdata_wa TO bdcdata_tab.
    opt-dismode = 'E'.
    opt-defsize = 'X'.
    CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.

  • How to assign a class to the material through ABAP code

    Hi,
    I am working on a transaction in ABAP which takes material name, material description and a class from the user. Now, after this much input I create the material, its configuration profile through the ABAP code. For this I know I have to make relevant entries in tables MARA, MAKT, CUCO.. and also check for the existence of the class in the table KLAH.
    Now the point where I am stuck is that I am not able to get how to assign the class to the material through the code. I am able to get the internal class id from the table KLAH but I am not able to figure how the internal material number is being generated in the table INOB and i need this number as well as the internal class id number to insert a record in the table KSSK to show proper assignment.
    Can anyone please suggest me some solutions?
    Thanks....

    Hi,
    I tried using BAPI_OBJCL_CREATE. In order to understand it functioning better I created a material and class (of type 300) through transactions MM01 and cl01 respectively. Then i  created a report and called the FM BAPI_OBJCL_CREATE, gave the material name as the material above, table as MARA, class as the one i created above and class type 300. I even analysed the message of the table return (return-message) after executing the report. The messahe said assignment done. But when I checked mnaually in cl20n there was no assignment done to the required material. There was also no entry for the required material in the table INOB which I need.
    Can anyoene tell me that where am i going wrong? Please do help.

  • How to call java function through Web Service

    Hello Experts,
    I want to call a method through Java Web Service in my abap code. Is it possible ? If so, plz guide me.
    Requirement: In SD module user enters the PAN, on after entering PAN in want to validate it on NSDL. For that a Web Service has already been deployed on a Web Server. and that the deployed Web Service I want to call in abap code.

    Hi,
    check this link
    Re: Call to WS from one backend to other backend
    regards
    afzal

  • Help regarding MBeanServerConnection queryName function

    Hi guys, i recently start using JMX and i need some help regarding queryName function. I want to get a specific set of objectNames, not all of them.
    I have the following List of Beans
    ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=14b69d-eee40f3d6467,name=LoadBalancerServer
    ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=40-a0b2-f1dfb314406f,name=LoadBalancerServer
    ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=98-4af4-9147-bf45fb49c044,name=LoadBalancerServer
    ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=c-4bf6-9c42-d5c3acea6662,name=LoadBalancerServer
    ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,name=LoadBalancerListener
    ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,name=LoadBalancerRedirector
    ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=IOPerformance
    ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=MediaCache
    ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=PendingReadAheadRequestTracker
    ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=PendingWriteRequestTracker
    ObjectName = WowzaMediaServerPro:name=Connections
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=Connections
    ObjectName = WowzaMediaServerPro:name=HandlerThreadPool
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=HandlerThreadPool
    ObjectName = WowzaMediaServerPro:name=IOPerformance
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=IOPerformance
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=IOScheduler
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=chat,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=default,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=file,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live-record,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live-record-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-buffer,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-edge,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-edge-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-edge-origin,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-origin,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=netconnection,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=record,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer-record,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer-record-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live-record,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live-record-lowlatency,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtpout,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast-buffer,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast-buffer-record,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast-record,name=Properties
    ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=Properties
    ObjectName = WowzaMediaServerPro:name=Server
    ObjectName = WowzaMediaServerPro:name=ServerNotifications
    My question is that , how can i get those rows that contains "WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers"?
    Please help

    Hello ,
    There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
    For your usecase, you should do the following.
            lo_fdt_function         TYPE REF TO if_fdt_function,
            lo_fdt_result           TYPE REF TO if_fdt_result,
    * Get function handle
          CALL METHOD lo_fdt_factory->get_function
            EXPORTING
              iv_id       = lv_function_id
            RECEIVING
              ro_function = lo_fdt_function.
    where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
    *   Set function context
        TRY.
            CALL METHOD lo_fdt_context->set_value
              EXPORTING
                iv_id    =
                ia_value =
    This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
    * Execute BRFPLUS function
      TRY.
          CALL METHOD lo_fdt_function->process
            EXPORTING
              io_context = lo_fdt_context
            IMPORTING
              eo_result  = lo_fdt_result.
    * Get result output
      TRY.
          CALL METHOD lo_fdt_result->get_value
            IMPORTING
              ea_value =
    Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
    I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
    Regards,
    Indranil.

  • Updating HRP table through abap codes - is it correct

    Hi all,
    In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
    For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
    Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP  table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
    REPORT  ZHRPAR0005 .
    TABLES: HRP1000, HRP1001.
    DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
    SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
    IT_1001-OTYPE = 'S'.
    APPEND IT_1001.
    INSERT INTO HRP1001 VALUES IT_1001.
    Thanks
    Ribhu

    Hi Ribhu..
    there are various FMs available for this purpose..
    use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
    then some related table might not be updated..
    So use FMs..
    RH_COPY_INFTY
    RH_CUT_INFTY
    RH_DELETE_INFTY
    RH_INSERT_INFTY
    RH_INVERT_RELA_INFTY
    RH_UPDATE_INFTY
    <b>For IT 1001 </b>
    RH_CUT_INFTY_1001_EXT
    RH_CUT_INFTY_1001_EXT_GENERIC
    RH_DELETE_INFTY_1001_EXT
    RH_DEL_INFTY_1001_EXT_GENERIC
    RH_INSERT_INFTY_1001_EXT
    RH_UPDATE_INFTY_1001_EXT
    RH_BASE_READ_INFTY_1001
    RH_READ_INFTY_1001
    RH_READ_INFTY_1001_EXT
    RH_READ_INFTY_1001_EXT_ONLY
    Reward if useful
    Regards
    Prax

  • Updating HRP tables through abap code- is it correct?

    Hi all,
    In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
    For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
    Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
    REPORT ZHRPAR0005 .
    TABLES: HRP1000, HRP1001.
    DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
    SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
    IT_1001-OTYPE = 'S'.
    APPEND IT_1001.
    INSERT INTO HRP1001 VALUES IT_1001.
    Thanks
    Ribhu

    Hi Ribhu..
    there are various FMs available for this purpose..
    use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
    then some related table might not be updated..
    So use FMs..
    RH_COPY_INFTY
    RH_CUT_INFTY
    RH_DELETE_INFTY
    RH_INSERT_INFTY
    RH_INVERT_RELA_INFTY
    RH_UPDATE_INFTY
    For IT 1001
    RH_CUT_INFTY_1001_EXT
    RH_CUT_INFTY_1001_EXT_GENERIC
    RH_DELETE_INFTY_1001_EXT
    RH_DEL_INFTY_1001_EXT_GENERIC
    RH_INSERT_INFTY_1001_EXT
    RH_UPDATE_INFTY_1001_EXT
    RH_BASE_READ_INFTY_1001
    RH_READ_INFTY_1001
    RH_READ_INFTY_1001_EXT
    RH_READ_INFTY_1001_EXT_ONLY
    Reward if useful
    Regards
    Prax

  • Calling Java Services from ABAP code

    Hi,
    How to call Java services (not web service) from ABAP code?
    I have a requirement where JAVA team has developed some services that can be called from URL or from a Java application.
    Ex:  when this URL is executed,
    http://localhost:8080/artemis7_802/triton/mycompany.remoteFunctions.RequirementsList.a7x?requestid=3023&requestname=I6PRAO1&skill=SAP&skill=JAVA
    It returns a XML file on browser.
    And I have no idea about the 2nd way i.e. from Java application!
    Now, how can ABAP call these java methods?
    I heard that something can be done via maintaining RFC destinations in SM59 to call Java services? Can this be done with my requirement?
    Please help.
    Thanks and regards,
    Amey

    Posted it in WD ABAP forum.

  • JCo Outbound( calling Java Function from ABAP )

    HI,
    I want to call a JAVA function from ABAP.I have installed the JCo toolkit and included the sapjco.jar file in the classpath of my system.
    When i execute the program(Example5.java,provided with sapjco.zip) from the command prompt,it is working fine,the server listens to the calls made from ABAP via RFC destination.
    But if i copy the same program in NWDS in a JAVA project,to run it from there as JAVA application,after including the sapjco.jar file in the project JAVA build path,i get the following error,marked by a red cross ,at the head of the program,even before i run it.
    <b>This compilation unit indirectly references the missing type com.sap.jdsr.writer.DsrIPassport (typically some required class file is referencing a type outside the classpath)</b>
    What changes do i need to make,to run it from NWDS?
    I tried to include the sapjcorfc.dll file along with the sapjco.jar in the java build path,but it doesn't help.
    Please tell how to solve this issue?
    Regards,
    Siddhartha

    hello sid,
    which jco version are you using?
    are you using the same jco lib when running in command
    line and in nwds?
    if you are, try checking the order of the your classpath.
    your jco lib (which you are using in command line) should
    come first in order prior to the default libraries in your project.
    regards
    jo

  • Calling of webmethods through abap programme

    Hello experts,
    There is requirement in my project related to webmethods.i have to create an ABAP programme(REPORT) To download a report using a new webmethod service.The programme will call the webmethod service using the following parameters:
    - Merchant ID
    - Password
    - Report Name/Format
    - Report Date.
    The wM service will pass back the report contents to the calling program.  The program will then build an output file onto the SAP UNIX interface directory for subsequent processing by  another program .
    can any one please send me a brief pseudocode,as i don't know webmethods.
    please help me as this is a very crunch situation.
    regards
    Prasun

    Hi Prateek,
    i don't know which version i am using,i don't know how to invoke webmethods through ABAp programme.i just wanta a brief pseudocode for the same.
    regards
    Prasun

  • PInvoke - Issue while calling DJVU function from C# Code - Attempted to read or write protected memory

    Hi,
    I know there are many questions in this subject but none of them help to resolve the issue I am currently facing.
    Below is the signature of C Function from DJVULibre added in .NET code
    [DllImport("C:\\Program Files\\DJVULIBRE\\LIBDJVULIBRE.dll", CharSet=CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
    private unsafe static extern int ddjvu_page_render(IntPtr page, ddjvu_render_mode_t mode, IntPtr pagerect,
    IntPtr renderrect,
    IntPtr pixelformat,
    ulong rowsize,
    [Out][MarshalAs(UnmanagedType.LPArray)]byte[] imagebuffer);Below is how I am calling this function in the c# codebyte* buffer = (byte *)Memory.Alloc(nSize);
    try
    IntPtr ptr1 = (IntPtr)Memory.Alloc(Marshal.SizeOf(prect));
    Marshal.StructureToPtr(prect, ptr1, false);
    IntPtr ptr2 = (IntPtr)Memory.Alloc(Marshal.SizeOf(rrect));
    Marshal.StructureToPtr(rrect, ptr2, false);
    byte[] array = new byte[nSize];
    fixed (byte* p = array) Memory.Copy(buffer, p, nSize);
    ddjvu_page_render(page, ddjvu_render_mode_t.DDJVU_RENDER_MASKONLY, ptr1, ptr2, fmt, (ulong)stride, array);
    finally
    Memory.Free(buffer);
    }call to ddjvu_page_render in above code is throwing "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
    Prior to this post I must have tried all the option could find in various blogs.
    Appreciate any help, is almost a day I am clueless, your timely help could save my job

    Thanks Viorel, below is the definition of original C function
    DDJVUAPI int
    ddjvu_page_render(ddjvu_page_t *page,
    const ddjvu_render_mode_t mode,
    const ddjvu_rect_t *pagerect,
    const ddjvu_rect_t *renderrect,
    const ddjvu_format_t *pixelformat,
    unsigned long rowsize,
    char *imagebuffer );below is how the code is calling this function in C#, the in pointers are all valid pointer I checked in debugging window byte* buffer = (byte *)Memory.Alloc(nSize);
    try
    IntPtr ptr1 = (IntPtr)Memory.Alloc(Marshal.SizeOf(prect));
    Marshal.StructureToPtr(prect, ptr1, false);
    IntPtr ptr2 = (IntPtr)Memory.Alloc(Marshal.SizeOf(rrect));
    Marshal.StructureToPtr(rrect, ptr2, false);
    byte[] array = new byte[nSize];
    fixed (byte* p = array) Memory.Copy(buffer, p, nSize);
    ddjvu_page_render(page, ddjvu_render_mode_t.DDJVU_RENDER_MASKONLY, ptr1, ptr2, fmt, (ulong)stride, array);
    finally
    Memory.Free(buffer);

  • BPC Master Data Deletion through ABAP code

    Hi All,
    I have a requirement of deleting the orphan nodes for one of the dimension in BPC using ABAP code.
    Please let me know any standard program or classes for deleting the master data from dimension.
    Regards
    Pratibha Biradar

    Hi Pratibha,
    Here is the code to add master data, you can change the flag to 'D' to delete, i have not checked it for delete, it is working for adding.
    DATA: ls_message TYPE uj0_s_message,
    lt_messages TYPE uj0_t_message,
    l_success TYPE uj_flg,
    l_appset_id TYPE uj_appset_id,
    l_dimension_id TYPE uj_dim_name,
    lo_member_mgr TYPE REF TO if_uja_member_manager,
    lo_dimension TYPE REF TO if_uja_dimension_manager,
    lo_master_data_store TYPE REF TO if_ujam_master_data_store,
    lo_context TYPE REF TO if_uj_context,
    ls_dimension TYPE uja_s_dimension,
    lt_errors TYPE uja_t_members_error,
    lr_members TYPE REF TO data,
    lr_data TYPE REF TO data.
    FIELD-SYMBOLS:
    <lt_member_data> TYPE STANDARD TABLE,
    <ls_member_data> TYPE any,
    <lv_field> TYPE any.
    TRY.
        lo_context = cl_uj_context=>get_cur_context( ).
        cl_uj_context=>set_cur_context(
        i_appset_id = l_appset_id
        i_module_name = lo_context->d_calling_module
        is_user = lo_context->ds_user
        lo_dimension = cl_uja_bpc_admin_factory=>get_dimension_manager(
        i_appset_id = l_appset_id
        i_dimension_id = l_dimension_id
        lo_dimension->get(
        EXPORTING
        if_with_hier_maxlevel = abap_false
        IMPORTING
        es_dimension = ls_dimension
        CREATE OBJECT lo_master_data_store TYPE cl_ujam_master_data_store.
    * creating masterdata table
        lr_members = lo_master_data_store->get_table_buffer( ls_dimension ).
        ASSIGN lr_members->* TO <lt_member_data>.
    * Add members to <LT_MEMBER_DATA>, these are the member that will be saved.
        CREATE DATA lr_data LIKE LINE OF <lt_member_data>.
        ASSIGN lr_data->* TO <ls_member_data>.
    * Fill each field, such as ID, and EVDESCRIPTION, update other fields here as well as
    * any properties that need to be updated.
        ASSIGN COMPONENT 'ID' OF STRUCTURE <ls_member_data> TO <lv_field>.
        IF sy-subrc = 0.
          <lv_field> = 'ProductD'.
        ENDIF.
        ASSIGN COMPONENT 'MBR_NAME' OF STRUCTURE <ls_member_data> TO <lv_field>.
        IF sy-subrc = 0.
          <lv_field> = 'ProductD'.
        ENDIF.
        ASSIGN COMPONENT 'EVDESCRIPTION' OF STRUCTURE <ls_member_data> TO <lv_field>.
        IF sy-subrc = 0.
          <lv_field> = 'Product D Update'.
        ENDIF.
        ASSIGN COMPONENT 'PARENTH1' OF STRUCTURE <ls_member_data> TO <lv_field>.
        IF sy-subrc = 0.
          <lv_field> = 'TotalProduct'.
        ENDIF.
        ASSIGN COMPONENT 'OBJVERS' OF STRUCTURE <ls_member_data> TO <lv_field>.
        IF sy-subrc = 0.
          <lv_field> = 'A'. "Version flag, should be "A" for Active
        ENDIF.
        ASSIGN COMPONENT 'ROWFLAG' OF STRUCTURE <ls_member_data> TO <lv_field>.
        IF sy-subrc = 0.
    """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""Here you can change it to 'D' for Deleting """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
          <lv_field> = 'I'. " This is an action flag, I=Insert, M=Modify """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
        ENDIF.
        APPEND <ls_member_data> TO <lt_member_data>. " Add to the table.
    * Create member manager
        lo_member_mgr = cl_uja_bpc_admin_factory=>get_member_manager(
        i_appset_id = l_appset_id
        i_dimension_id = l_dimension_id ).
    * Save the members UNCOMMENT ONLY when you want to write the data!!!!!
    * lo_member_mgr->save(
    * EXPORTING
    * ir_members = lr_members " List of members to save
    * IMPORTING
    * et_errors = lt_errors
    * NOW PROCESS THE DIMENSION
        DATA: ls_dimensions TYPE uja_s_dim_name,
        lt_dimensions TYPE uja_t_dim_name.
        CLEAR ls_dimensions. REFRESH lt_dimensions.
        ls_dimensions-dimension = l_dimension_id. " Add dimensions to the list
        APPEND ls_dimensions TO lt_dimensions.
        lo_member_mgr->process(
        EXPORTING
        it_dim_list = lt_dimensions
        if_set_offline = abap_false
        if_validate = abap_true
        IMPORTING
        ef_success = l_success
        et_message_lines = lt_messages ).
      CATCH cx_uj_no_auth .
    ENDTRY.
    hope this will help,
    thanks,
    Rishi

  • Help needed in writting Customer exit - ABAP Code

    Hi Friends,
    I have a scenario in one of the query and need to write a customer exit for the same. Here is the scenario:
    I am using one input variable XXX to get input from user which feeds value to one of the charateristic  lets say "CHAR1" in query. I have one more characteristic "CHAR2" which has to get the value from the same variable XXX. This is not allowed in BI7.0 as the variable is Hierarchy Node type. It gives error that "Variable XXX is used for two different characteristics."
    So i need to create one more vaiable YYY which will get the value from XXX and then YYY will feed value to CHAR2.  I would appreciate if some one could tell me step by step how to write customer exit and give me the piece of ABAP code i need to write in my case.
    Your help will be appreciated in terms of points.
    Thanks,
    manmit

    Hi Arun,
    1. What should CHAR2 take - Hierarchy node variable or something else ?
    --> CHAR2 is a simple charateristic
    2. In your scenario - why have CHAR1 and CHAR2 ? why not have the user enter values against CHAR2 ??
    --> We dont want user to enter two input as the input values for both Chars are same.
    3. Did you try using a replacement path variable with the CHAR2 variable taking values from Variable on CHAR1 ?
    --> In BI7.0 replacement path variable only take values from Query results. So not able to do the same.
    Thanks

Maybe you are looking for

  • How to time slideshow on apple tv?

    I have a new Apple tv and would like to increase the duration of items displayed in a slideshow. My photos are in an Aperture 3 library. Is it possible? How? Using OS X 10.8.2.

  • Video out of synch with audio premiere cs4

    Hi, im really new to Adobe premiere pro cs4 and i just wanted to import a video. Most of the videos I import are out of synch with the audio.  The audio is in time, but the video is sped up about 6 times as fast????

  • Effort estimate (ABAP) during Unicode Conversion project

    Hi , I am working on a CU&UC (Combined Upgrade and Unicode Conversion) project from 46C to ECC6. We are having 8 different codepages (MDMP SYSTEM) and around 10000 custom objects. Does anyone have any experince in doing such kind of project ? I am lo

  • HT5525 I can't find the updates tab in the mac app store (just updated iTunes)?

    I'm trying to purchase a book of photos through iPhoto - it tells me to update iPhoto before I can order the book. My macbook pro is running OSX Lion so it says I can update iPhoto "in the updates tab of the mac app store"... but when I go to the app

  • IPhoto problems

    When i plug my iphone into my imac for the first time it only shows up pictures from my camera roll and not pictures from other folders? I want to import all pictures from my iphone?