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: 

Is there any FM for Loading data into Standard table

Former Member
0 Kudos

Dear Team,

I want to load data into one standard table using Standard FM . The transactioncode(J1ID) itself contains only one standard table.

Can u please let me know is there any Standard FM to load the data into Standard table .

Regards,

Anilkumar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Anil,

There is no such option available. Even though the transaction deals with one table, write a BDC program and upload the data via flat file.

It's not suggestable to upload data directily to a standard table as the transaction may have validation before saving the data.

Praneeth

11 REPLIES 11

Former Member
0 Kudos

Anil,

There is no such option available. Even though the transaction deals with one table, write a BDC program and upload the data via flat file.

It's not suggestable to upload data directily to a standard table as the transaction may have validation before saving the data.

Praneeth

former_member556412
Active Participant
0 Kudos

Hi,

Could you please let us know how the data is coming is it coming in the form of excel sheet?

regards,

Bhanu

0 Kudos

Hi Bhanu ,

I will be getting data from Application Directory(AL11 Transaction) ( text tab delimited format).

Then i will be splitting data and storing data into internal table . i cannot use BDC as the Standard transaction itself simulating SM30 Transaction.Once i select Material ChapterID combination in J1ID Transaction and

press display button ,in the next screen it is simulating SM30 Functionality( what we see in SM30).

There is no chance of BDC in this case.

The transaction itself simulating SM30 with One standard table.

Regards

Anil

0 Kudos

Dear Anil,

It does not matter whether this transaction is using SM30 or not..you simply create one BDC for J1Id.

Have a Nice Day,

Regards,

Sujeet

0 Kudos

Hi Anil,

I know that the J1ID transaction it is directly simulating to SM30 , but you can record the transaction, below is the recording code for your reference.

perform bdc_dynpro using 'SAPMJ1ID' '0200'.

perform bdc_field using 'BDC_CURSOR'

'RB1'.

perform bdc_field using 'BDC_OKCODE'

'=EX'.

perform bdc_field using 'RB11'

''.

perform bdc_field using 'RB1'

'X'.

perform bdc_dynpro using 'SAPLJ1I5' '0020'.

perform bdc_field using 'BDC_CURSOR'

'J_1IMTCHID-MATNR(01)'.

perform bdc_field using 'BDC_OKCODE'

'=NEWL'.

perform bdc_dynpro using 'SAPLJ1I5' '0020'.

perform bdc_field using 'BDC_CURSOR'

'J_1IMTCHID-J_1ICHID(01)'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'J_1IMTCHID-MATNR(01)'

***material code.

perform bdc_field using 'J_1IMTCHID-WERKS(01)'

**Plant code

perform bdc_field using 'J_1IMTCHID-J_1ICHID(01)'

      • Chapter id

perform bdc_dynpro using 'SAPLJ1I5' '0020'.

perform bdc_field using 'BDC_CURSOR'

'J_1IMTCHID-MATNR(02)'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_dynpro using 'SAPLJ1I5' '0020'.

perform bdc_field using 'BDC_CURSOR'

'J_1IMTCHID-MATNR(02)'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_dynpro using 'SAPMJ1ID' '0200'.

perform bdc_field using 'BDC_OKCODE'

'/EEXIT'.

perform bdc_field using 'BDC_CURSOR'

'EXCISE'.

perform bdc_transaction using 'J1ID'.

Hope this reference code is useful for you.

0 Kudos

Dear All,

For our requirement ,we should go only with BAPI or Standard FM's.

sorry i forgot to say about this in the begining.

Thanks for your inputs.

Regards,

Anilkumar

0 Kudos

Hi AnilKumar,

But I could not find any standard FM or Bapi for this, you can create your own Bapi using recording to for uploading data in those standard tables in trasaction J1ID

Regards,

Kimaya

0 Kudos

HI,

For u[pdating the table use FM DB_UPDATE_TABLE and for instering new records use the FM

DB_INSERT_TABLE.

I hope these FM will help you.

BR,

Rajani

Former Member
0 Kudos

Hi AnilKumar,

I don't think there is any Function Module for loading data into transaction code J1ID, You can create a BDC for uploading data for transaction code J1ID.

Former Member
0 Kudos

This are the list of tables in j1id code is releated........

J_1IEXCHDR, j_1iexcdtl,ekpo,a003,konp,j_1iassval,j_1iexctax.

for table updation..

use this command.

modify internal table name

if sy-subrc = 0.

commit work.

else.

rollback work.

endif.

former_member229729
Active Participant
0 Kudos

Hi,

Sample code for Updating the Table:

* Primary key equnr  is used for table EQUI.
  SELECT SINGLE * FROM EQUI INTO I_EQUI
    WHERE EQUNR EQ PI_EQUNR.
  APPEND I_EQUI.

* Call function module to update the Master Record
  CALL FUNCTION 'DB_UPDATE_TABLE'
    EXPORTING
      TABLENAME      = 'EQUI'
    TABLES
      INTTAB         = I_EQUI
    EXCEPTIONS
      DB_ERROR       = 1
      NOT_FOUND      = 2
      WRONG_PARAM    = 3
      INTERNAL_ERROR = 4
      OTHERS         = 5.

Rgds,

Ramani N