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

RFC function and user parameters

Former Member
0 Likes
1,222

Hi all,

I made an RFC function that uses BAPI_GOODSMVT_CREATE.

My problem is now to get automatically the output message (defined on the customizing) for the material document.

To do this I've first tried to set the parameter 'NDR' to 'X' before calling the BAPI, but it was not workinig.

It works if I set it in the User Parameters, but.... only when I'm running the function with SE37.

When the function is called from the external system... it doesn't work

The RFC function is called always with the same user and I setted the NDR parameter on for this user.

Somebody can tell me why it's not working and where I'm wrong?

The only difference is that my user is a dialog user (with gui) and the external systen user is a communication user (without gui). Can be this the reason? Do I have any possibility to solve this issue?

Thanks!

P.S. Also an easy way to create the message after the bapi is called can be usefull

6 REPLIES 6
Read only

Former Member
0 Likes
849

Hi,

You need to loop over the return internal table of type bapiret2 & then populate your own internal table.

Best regards,

Prashant

Read only

0 Likes
849

Thank you for your answer... but .. what do you mean?

My problem is that the goods receipts labels are not printed using the BAPI, also if I set the user parameter NDR to value 'X'.

It seemst that setting user parameters for a communication user doesn't work!

Read only

Former Member
0 Likes
849

Hello,

The RFC function is called always with the same user ...

The only difference is that my user is a dialog user (with gui) and the external systen user is a communication user ...

Are you sure, that the user parameter NDR = 'X' (capital letter!) is set for the "communication user"?

Best regards

Stephan

Read only

0 Likes
849

Yes, I've checked it several time!!!

Read only

0 Likes
849

Hello,

OSS note 520813 (https://service.sap.com/sap/support/notes/520813) question 12, describes the solution.

You have to fill the field PR_UNAME in the headerstructure with an user id. This user id must have set the user parameter NDR = 'X' (not the communication user). You also have to do all customizing settings for this user.

Best regards

Stephan

Read only

0 Likes
849

Hi Stephan,

Thank you so much for your answer!!!

So simple and it seemst to work

I've only tried with SE37 (giving differents users) and it's only printing the labels for the ones with the NDR parameter on!

Unfortunatly I must wait tomorrow to make a real test (calling the function from the external system) but I think it will be good!