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

Making Default User while posting through BDC program through call transaction method

Former Member
0 Likes
2,879

Hi Friends,

                Is it possible to set user as default user(Hardcoded) while posting F-04 transaction through BDC. Which means who ever runs program posting should happen only through the default user name.

            The program was developed through BDC Call transaction. Now Client was this Req with default user

          Please suggest me in achieving this ..

Thanks in Advance

Lokesh

1 ACCEPTED SOLUTION
Read only

yogendra_bhaskar
Contributor
0 Likes
1,754

Hi Lokesh ,

You have to run the BDC as scheduled job.

You need to schedule job as :

1. Call FM JOB_OPEN

2. Then SUBMIT

SUBMIT <program>

WITH..

USER <default_username>

VIA JOB <job name>

AND RETURN.

3. Call FM JOB_CLOSE

Username against job would be user name running the program , but username against the particular step would be default username.

Regards

Yogendra Bhaskar

10 REPLIES 10
Read only

former_member196331
Active Contributor
0 Likes
1,754

I hope not possible. Bdc means almost running Foreground , What you are running in front end bdc is doing. backend.

I am Creating mm01, By using Manual Steps Is it possible to change sy-uname, Hope Not possible.

Small suggestion:Run bdc in Background job. After particular Event Not date and time . Under particular user May be your problem will be solves.

Read only

0 Likes
1,754

Hi

"Small suggestion:Run bdc in Background job. After particular Event Not date and time . Under particular user May be your problem will be solves."



You want me to run BDC through backround via Submit program ??  Will u please eloberate

Read only

0 Likes
1,754

Hi...
How you running the bdc, Normally People will use Se38 ,After recording the shdb.

So, you hardcore the Field values in the program. Just run the same program in job

Already Examples are there, how to scheduling the job sm36  with Programming run.

Read only

pranay570708
Active Contributor
0 Likes
1,754

In your report, try changing SY-UNAME to harcoded value before BDC code.

SY-UNAME = '<USER>'.

Read only

0 Likes
1,754

hi Pranay,

            i tried by changing system user,But it didn't work out .e system is picking back exact user

Read only

0 Likes
1,754

Hi, Why not you go for a BAPI.

'BAPI_ACC_DOCUMENT_POST'.

BAPI_ACC_DOCUMENT_REV_POST .

BAPI_ACC_BILLING_REV_POST

And Change the parameter USERNAME/CREATED_BY in header structure.

If you want to stick to BDC, then below thread can be helpful.

Read only

0 Likes
1,754

Hi,

   My BDC program is inside of an RFC Function Modue. Wether we can acheive through RFC..

  Any Idea on this

Read only

0 Likes
1,754

Hi,


Create a separate program for the CALL TRANSACTION BDC logic and used it inside the RFC.


Call that report using SUBMIT PROGRAM with options '[USER user]. If the user is passed to USER option, it will process the BDC as if it's being processed under the session of the particular user passed. So the same will reflect in logs. Try this.

Read only

yogendra_bhaskar
Contributor
0 Likes
1,755

Hi Lokesh ,

You have to run the BDC as scheduled job.

You need to schedule job as :

1. Call FM JOB_OPEN

2. Then SUBMIT

SUBMIT <program>

WITH..

USER <default_username>

VIA JOB <job name>

AND RETURN.

3. Call FM JOB_CLOSE

Username against job would be user name running the program , but username against the particular step would be default username.

Regards

Yogendra Bhaskar

Read only

0 Likes
1,754

Hi Yogendra,

                Current  BDC Program was written inside an RFC Function module . Can we acheive this

through this RFC. any idea