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

batch-input create one session per row ¿?

0 Likes
2,422

Hello all

im very new to SAP and ABAP and i have a basic question for sure...

Im testing with baych-inputs...

  1. i create a new rec in SM35 for su01 (create user)
  2. i save the REC and create a program based on the recording steps.
  3. i add the internal table to fill the new users from a txt tab separator file located on my c drive
  4. perform a loop to iterate the table
  5. all seems fine.
  6. then execute the program and SAP ask me for a session name
  7. BUT when execute it creates 3 sessions (one session per row (new user) of the table(txt file)

i expect to get only one session that after that i can run or schedule.

why?

kind regards

abap-create-user.txt

users-sap.txt

10 REPLIES 10
Read only

r010101010
Active Participant
0 Likes
2,213

Hello Javier,

It is supposed to function as i should. let me explain;

You have created a recording to create one user, adding information for one single user and pressing SAVE for one single user.

So when you are executing your BDC, and this is presented by one line one line in the file.

I dont think there is any transaction for create users in mass. else you can use the BAPI BAPI_USER_CREATE1.

Hope this helps.

Regards,

Deenesh

Read only

FredericGirod
Active Contributor
0 Likes
2,213

You close the BDC inside the loop, check your code

if you are beggininer it is nice to see one time BDC, but as Deenesh said, it is better to use BAPI

Read only

0 Likes
2,213

thnank you both for the suggestions....BAPI seems too much advanced for me right now...

Frederic....your are right, indeed i thought of that but i not change it...now creates only 1 session.

But now i figured out that i cant execute the session in background, because it ask me for input in some fileds "invisible" during the REC, like

BDC_OKCODE' '=CREA'. and 'BDC_OKCODE' '=LOGO'.

how can i bypass this issue?

regards

Read only

0 Likes
2,213

i try with /00 and ENTR but still prompting for the manual check button

Read only

0 Likes
2,213

when you record your session (trans SHD0) record in background mode (or something like that) and you will see the screen like in background

Read only

0 Likes
2,213

Thanks Frederic

i record in SM35-->recordings(SHDB).....i check the background option you comment before REC, but the screen experience and generated code are identical.... 😞

is there something to touch in SHD0?

regards

Read only

Sandra_Rossi
Active Contributor
0 Likes
2,213

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area: "Before answering You should only submit an answer when you are proposing a solution to the poster's problem"

Read only

dev_parbutteea
Active Contributor
0 Likes
2,213

1. Go to transaction SHDB, create your recording. then, Generate the program in the same transaction...

2. If you just look for a tutorial on the web, You'll find lots of them..:

https://www.youtube.com/watch?v=nvfRB7q3BK8

Read only

0 Likes
2,213

yes....i already done similar as the video shows....my question is regarding about the inputs you provide when executing the program...

This method seems not valid to automate, since it require manual inervention of the user (clicking the accept button).....so it can be done fully automated to the program it in a job?

regards

Read only

0 Likes
2,213

Unless you missed any mandatory field during your recording , you should not have any issue. You need to provide your code for us to help you find any issue with the code..