cancel
Showing results for 
Search instead for 
Did you mean: 

GetList Parameter in SyncBO type T01 or T51

former_member207329
Participant
0 Kudos

Hi all,

This is Abap code for my GetList :

function zpm_po_getlist .

*"----


""Interfaccia locale:

*" EXPORTING

*" VALUE(RETURN) TYPE BAPIRET2

*" TABLES

*" ZBAPIEKKO STRUCTURE ZBAPIEKKO

*"----


tables: ekko,lfa1,zutenti.

  • break-point.

  • SELECT * FROM zutenti WHERE nome EQ uname.

select * from ekko where bstyp = 'F' and

bukrs = '1000' and

  • submi = zutenti-project AND

loekz = space.

select single * from lfa1 where lifnr eq ekko-lifnr.

select single * from zutenti where project = ekko-submi.

zbapiekko-uname = zutenti-nome.

zbapiekko-po_number = ekko-ebeln.

zbapiekko-created_on = ekko-aedat.

zbapiekko-vendor = ekko-lifnr.

zbapiekko-coll_no = ekko-submi.

zbapiekko-vend_name = lfa1-name1.

zbapiekko-doc_date = ekko-bedat.

collect zbapiekko.

endselect.

  • ENDSELECT.

commit work and wait.

endfunction.

The question is:

is possible add a "username" parameter in this bapi wrapper for to filter the data in the backend system and to return (of the backend system) only data of the value in the "username"?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rocco!

In your BAPI Wrapper(I guess what you have below is your BAPI) read the SYNCUSER as below from the inbound container.

data syncuser like usr02-bname.

data ret like sy-subrc.

read table inbound_container with key fieldname = 'SYNCUSER' .

if sy-subrc = 0.

syncuser = inbound_container-fieldvalue.

endif

Use this User Name to filter values in your backend if you have setup the correct data to filter in your backend.

Let me know if this helps & donot forget the rewards if this answers ur question.

Good Luck!

Thanks

Gisk

Former Member
0 Kudos

hello rocco,

to retrieve the sync username, you can use the ME parameter

ME-SYNC_USER. This parameter contains the value of the sync

user. thus you don't have to pass any external value.

regards

jo

Former Member
0 Kudos

>to retrieve the sync username, you can use the ME >parameter

>ME-SYNC_USER. This parameter contains the value of the >sync

>user. thus you don't have to pass any external value.

hello Jo,

how i can find the ME-SYNC_USER parameter?

Answers (1)

Answers (1)

kishorg
Advisor
Advisor
0 Kudos

Hello Rocco,

there is one more way to achieve this functionality,

during syncbo creation ,

in the case of getlist function module ,

add one more import parameter .(suppose username is the import parameter),

in the import tab , against this fieldname(username) , create one value id. after the creation of this syncbo, you will have to set default value for this value id that u have created.

here u will have to set SY-UNAME as default value.

at the time of synchronization , this import parameter value contains the user from which u have started synchronization. (this value u can use as filter in the abap code).

Regards

Kishor Gopinathan

Former Member
0 Kudos

hello kishor,

i have this problem:

my clients send to WAS many userid ('user1', 'user2'). WAS call R3 destination with only one userid ('user3').

R3 send to my clients the result of getList function, filtered by 'user1' or 'user2'.

How R3 can read user parameter dinamically?

client1 ('userid1')->

WAS ('userid3') -> R3

client2 ('userid2')->

Former Member
0 Kudos

Hi eliana!

This topic is closed already.Could you open a new topic if you have not resloved the issue yet.

Thx

Gisk