Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter to be passed for BAPI_TEX_EXPOSURE_CREATE

sathish_kumar92
Explorer
0 Kudos

Dear Experts,

Could anyone please explain me what all the parameters i need to pass to BAPI BAPI_TEX_EXPOSURE_CREATE to create exposure in treasury? If you share the code & explain me what this BAPI is doing & what all needs to be passed to this BAPI.

Thanks & Regards,

Sat

5 REPLIES 5

Former Member
0 Kudos

Hi Sathish,

                  please check your BAPI Name " BAPI_TEX_EXPOSURE_CREATE"  (Not available in SAP)

                  correct One " BAPI_TEM_EXPOSURE_CREATE" .

Regard's

Smruti Ranjan

0 Kudos

Hi smruti,

The bapi what you have given is for recreating exposures.

The bapi which I mentioned is for creating exposure.

Both exist in sap. If your familiar in using bapi_tem_exposure_create pls share it with me.

So that I might get some idea for using bapi_tex_exposure_create

Thanks

Sathish

0 Kudos

Hi Sathish,

                    please check this sample code .

==============================================

   DATA : I_EXPOSUREID_IN     LIKE BAPI5115-EXPOSURE_ID ,          " Exposure ID
       I_EXPOSUREORIGIN_IN LIKE BAPI5115-EXPOSURE_ORIGIN ,      " Exposure Origin
       I_LOGSYSTEM_IN      LIKE BAPI5115-LOG_SYSTEM,            " Logical System
       I_EXPOSURE          LIKE BAPI_TEM_EXPOS_CREATE OCCURS 0 WITH HEADER LINE,     " BAPI: Create Exposure in Exposure Management
       I_TESTRUN           LIKE BAPI5115-TESTRUN ,                                   " Switch to Simulation Mode for Write BAPIs
       T_RETURN            LIKE BAPIRET2  OCCURS 0 WITH HEADER LINE ,
       E_ERROR             LIKE BDCDATA-FVAL .



DATA: E_RETURNEXPOSUREID  TYPE  BAPI5115-EXPOSURE_ID ,
      E_RETURNEXPOSUREORIGIN  TYPE  BAPI5115-EXPOSURE_ORIGIN ,
      E_RETURNLOGSYSTEM TYPE  BAPI5115-LOG_SYSTEM .


I_EXPOSUREID_IN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'  .   "Exposure ID
I_EXPOSUREORIGIN_IN = 'XXXXX' . "Exposure Origin
I_LOGSYSTEM_IN = 'XXXXXXXXXX' .          " Logical System


I_EXPOSURE-CURRENCY_ISO = 'XXX' . "ISO currency code
I_EXPOSURE-AMOUNT       = 'XXXXXXXXXXXXX' . "BAPI: Amount or Nominal in Exposure Management
I_EXPOSURE-PLANNING_PERIOD = 'XXX' . " Planning Period
I_EXPOSURE-PLANNING_YEAR = 'XXXX' "  Plan Year
*..............................................
*..............................................
*.............................................
APPEND I_EXPOSURE .
CLEAR I_EXPOSURE .

I_TESTRUN = 'X' .   "Switch to Simulation Mode for Write BAPIs



CALL FUNCTION 'BAPI_TEM_EXPOSURE_CREATE'
  EXPORTING
    EXPOSUREID_IN        = I_EXPOSUREID_IN
    EXPOSUREORIGIN_IN    = I_EXPOSUREORIGIN_IN
    LOGSYSTEM_IN         = I_LOGSYSTEM_IN
    EXPOSURE             = I_TESTRUN
    TESTRUN              =  I_TESTRUN
  IMPORTING
    RETURNEXPOSUREID     = E_RETURNEXPOSUREID
    RETURNEXPOSUREORIGIN = E_RETURNEXPOSUREORIGIN
    RETURNLOGSYSTEM      = E_RETURNLOGSYSTEM
  TABLES
    RETURN               = T_RETURN.



READ TABLE T_RETURN WITH KEY TYPE = 'E'.
  IF SY-SUBRC EQ '0'.
    CONCATENATE T_RETURN-MESSAGE  T_RETURN-ID T_RETURN-NUMBER INTO E_ERROR SEPARATED BY SPACE.

    ELSE .

      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                        EXPORTING
                          WAIT          = 'X'
*                        IMPORTING
*                          RETURN        =
          .

  ENDIF.


  WRITE :/1 E_RETURNEXPOSUREID   , E_RETURNEXPOSUREORIGIN  ,  E_RETURNLOGSYSTEM .

0 Kudos

Hi Smruti,

Thanks for your time. I know how to populate the bapi parameters.

But my doubt is I want to know what is exposure ID, exposure origin,

What logical system we need to pass etc also u have populated currency

& amount from I will get all this in sap?.

Since I don't have a functional guy to support me I want to know the inputs for this bapi I sap

To create exposures.

If your aware of it pls share your knowledge.

Thanks

Sathish

0 Kudos

Hi Sathish,

                  with the help of SAP End user you can find all information regarding to Create exposures.

                  i mean to say what is SAP T-code they used , what field is mandator,optional ,data ect... bassed on the End user you can map those field into BAPI input parameter. if you doesn't have functional conulatnt then take help from SAP End user .

SAP Exposure Management 2 - Create Raw Expsoure 1 - YouTubehttp://www.youtube.com/watch?v=89APGBn6Qi0

Regard's

Smruti