Application Development and Automation 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: 
Read only

Massive Data Load for FTR_CREATE

Former Member
0 Likes
3,182

Hi! i am new as ABAP developer, and i got a requirement for loading data to FTR_CREATE tcode, the functional recommend me to use a Batch Input, but my companions told me it was not the best option and i should search for a BAPI to do that, i've been searching about this and i found some BAPIs, in another forum i heard about BAPI_FTR_FTD_CREATE, and i also found in google FTR_MIR_BAPI_CREATE, but i could not find examples where these BAPIs are used, i've never used a BAPI, I merely know these are FM and i must send parameters as importing or exporting, but i really like to see an example or a guide about its use, i'd be so gratefull if you could help with this problem. Thanks!!

PD: sorry for my english, my native languaje is the spanish.

1 ACCEPTED SOLUTION
Read only

Nawanandana
Active Contributor
2,770

Hi,

You can use BAPI, but i dont have sample code for this .

BAPI_FTR_FTD_CREATE Create Fixed-Term Deposit

BAPI_FTR_FTD_CHANGE Change Fixed-Term Deposit

1. First you have to upload data from Excel or text file into the internal table.

2.Format the data according to the FM.

3. If its create call BAPI_FTR_FTD_CREATE with relevant information . If its change BAPI_FTR_FTD_CHANGE use change FM.

4. End of the FM you have to use BAPI_TRANSACTION_COMMIT

Regards,

Nawa

4 REPLIES 4
Read only

Nawanandana
Active Contributor
2,771

Hi,

You can use BAPI, but i dont have sample code for this .

BAPI_FTR_FTD_CREATE Create Fixed-Term Deposit

BAPI_FTR_FTD_CHANGE Change Fixed-Term Deposit

1. First you have to upload data from Excel or text file into the internal table.

2.Format the data according to the FM.

3. If its create call BAPI_FTR_FTD_CREATE with relevant information . If its change BAPI_FTR_FTD_CHANGE use change FM.

4. End of the FM you have to use BAPI_TRANSACTION_COMMIT

Regards,

Nawa

Read only

0 Likes
2,770

Tranks for the help, but i really like to know about the paramaters these BAPIs uses, i have the data i must load but there is paramaters of importing/exporting i don't know, so this is my main problem.

Read only

2,770

Hi,

I just draft few code , you can complete it.

*---Define variable
*Go to SE37 and look at the export and import parameter of FM BAPI_FTR_FTD_CREATE
*Symply Double click and you can see all the infomation ( I didnt copy all the feild here )
DATA: gs_fixedtermdeposit     TYPE bapi_ftr_create_ftd,
      gs_generalcontractdata  TYPE bapi_ftr_create,
      lv_testrun              TYPE bapi2042-testrun,
      lv_financialtransaction TYPE bapi2042-transaction,
      lv_companycode          TYPE bapi2042-company_code,
      gt_return	              TYPE STANDARD TABLE OF bapiret2,
      gs_return	              TYPE bapiret2.


*loop at Itab" this is you data
*--Pass Data into Export parameters.
*--All the infomation you can see in the screen of FTR_CREATE.
* Fill data in to internal table of gs_fixedtermdeposit

*gs_fixedtermdeposit-CURRENCY        =
*gs_fixedtermdeposit-CURRENCY_ISO    =
*gs_fixedtermdeposit-START_TERM      =
*gs_fixedtermdeposit-END_TERM        =
*gs_fixedtermdeposit-FLOW_TYPE       =
*gs_fixedtermdeposit-AMOUNT          =

* Fill data in to internal table of gs_generalcontractdata ( I didnt copy all the feild here )
gs_generalcontractdata-company_code   =  '1000' . "pass Company code>
gs_generalcontractdata-product_type   = '01A' .   "Product type
gs_generalcontractdata-transaction_type = '  '.    "
gs_generalcontractdata-external_transaction_number = ' ' .
*gs_generalcontractdata-PARTNER
*
*---Pass all the parameter what you need

*---Call FM
CALL FUNCTION 'BAPI_FTR_FTD_CREATE'
  EXPORTING
    fixedtermdeposit     = gs_fixedtermdeposit
    generalcontractdata  = gs_generalcontractdata
    testrun              = lv_testrun
  IMPORTING
    financialtransaction = lv_financialtransaction
    companycode          = lv_companycode
  TABLES
    return               = gt_return.

*Check if there any error if its not comite the tranaction, then it will update DB
READ TABLE gt_return INTO gs_return WITH KEY type = 'E'.
IF sy-subrc = 0.

  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = 'X'.
ELSE.
  MESSAGE e000(e4) WITH 'BAPI Error '.
*Print Error Message
  LOOP AT gt_return INTO gs_return.
    WRITE:/ gs_return-message.


  ENDLOOP.
ENDIF.
*Endloop.


Read only

0 Likes
2,770

Thanks a lot for your answer, it was very usefull. Now i know how to prove the BAPI.