Skip to Content

Regarding BAPI return

Dear all,

I have one requirement in BAPI.i have created 5 ztables.

Example : 1) ZABCF

2) ZBCAD

3) ZDGFS

4) ZGHJK

5) ZJKILO

For every z table i created bapi's.

my requirement is data will trasfer from SAP to other(ABC) server.

Now other(ABC) server will access my data from ztables through BAPI's.

Also i have to retrieve data from other(ABC) server to SAP and save the data into SAP ztables.

So what should i do for above requirement.I need steps and coding and procidure.Please help me

in this matter.

Regards,

sree.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 10:09 AM

    HI,

    1. Create the IMPORTING Parameter for function like INSE,DISP,CHNG,DEL.

    2. Create the Table parameter which will hold the table data and can be used as per the above function codes.

    Depending on these Function you can write the code

    For example .

    In case of 'INSE' insert the data to the database.

    'DISP' fetch the data from DB and display.

    'CHNG' Logic of the changing the selected data

    'DEL' Logic for deleting data

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      As u r updating ztable u can very well use mass update ..i mean direct update to the ztables.

      declare the internal table as of the ztables type and then get the data in the internal table and update it

      for example.

      if nit itab1[] is initial.

      modify ztable1 from table itab1.

      if sy-subrc eq 0.

      commit work.

      endif.

      endif.

      like this for all other ztables... This code u can write in ur bapi...

      whenever there is a failure u can fill the return strture of the bapi.

      If u use zprogram then u have to get the file data either from the application server or from the local desktop.

      always it is safer if u use application server.

      once u get the data in ur appllication server then directly u can access the data by OPEN DATASET, CLOSE DATA SET method..

      and then fill the respcetive internal tables which are of type of ztables and then update directly which i mentioned earlier(same way).

      Regards,

      Nagaraj

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.