on 01-26-2006 10:46 AM
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"?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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')->
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.