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: 

BDC Issue For Transaction SE78

spartans007
Participant
0 Kudos
2,094

Hello,

I tried to create a recording for SE78 transaction but was not able to record the dropdowns and double click events. I have to click the dropdown in order to import the images.

I have to create a recording and a program to import multiple images.

I get an error field does not exist when i try to process the recording created.

Can Someone please help me with the recording or a program?

Thank You.

20 REPLIES 20

DominikTylczyn
SAP Champion
SAP Champion
0 Kudos
1,912

Hello spartans007

Unfortunately you can't create a functional batch input / recording for SE78 as the tree control is not supported by batch inputs - see the note 311440 - Batch input and controls

I think you need to create graphics using the CL_BDS_DOCUMENT_SET class.

Try this blog https://elearning-masasep.blogspot.com/2018/09/sap-abap-fm-upload-images-bmp-show-at.html to automate the import.

Best regards

Dominik Tylczynski

0 Kudos
1,912

Can you please provide me a program if you have any, Which will help me upload multiple BMP images in one go?

0 Kudos
1,912

spartans007 See my updated answer

0 Kudos
1,912

Sure I will go through the link. Thank You. 3a9e4ce873a94034b33dc62b0ce600ee

stanislaslemaire
Participant
0 Kudos
1,912

Hello,

I don't know what is this request is about, but sometimes, it's possible to use SAPGuiScripting in place of use of BDC, if it is for mass upload...

spartans007
Participant
0 Kudos
1,912

Yes it is regarding Uploading mass images using SE78 tcode. Can you provide me the code for mass upload using SAPGuiScripting stanislaslemaire

stanislaslemaire
Participant
0 Kudos
1,912

It's not very complicated, but no, I won't provide a ready-made code, that a full-time job ! 😉

To sum up idea :
First, be sure that SAPGui scripting is available on your system.
If yes, activate recording and process manually one time actions on SE78

Then a script will be recorded. Copy content in , for example, a VBA Excel macro and do some adaptation to loop on data from your Excel sheet and it's all. Just execute macro to replay all SE78 recorded actions for each lines...

Use online resources as help and once you have mastered the exercise, you can make your own loading tools.

Sandra_Rossi
Active Contributor
1,912

I have already given the solution to you, in your previous question. Thank you to not giving the clues to other people.

EDIT: okay, got it, it says that the graphics is imported, but one data is wrong, I fixed the bug in code below ('GRAPHICS' instead of 'BITMAP').

You can't do batch input on SE78 but you can simulate SE78 upload with this code => will display one classic screen, on which you can operate the batch input:

REPORT.
FIELD-SYMBOLS <g_stxbitmaps> TYPE stxbitmaps.
PERFORM dummy_dummy_dummy IN PROGRAM sapmssch IF FOUND.
ASSIGN ('(SAPMSSCH)G_STXBITMAPS') TO <g_stxbitmaps>.
<g_stxbitmaps>-tdobject = 'GRAPHICS'.
<g_stxbitmaps>-tdid     = 'BMAP'.
<g_stxbitmaps>-tdbtype  = 'BCOL'.
PERFORM graphic_import_bds IN PROGRAM sapmssch.

EDIT 2: to write to transport request, use SAPSCRIPT_TRANSPORT_OBJECTS. It will prompt for a transport request, that you may automate via batch input too:

data l_task type e070-trkorr.
call function 'SAPSCRIPT_TRANSPORT_OBJECTS'
       exporting
            objecttype               = 'BDS'
            grobject                 = <g_stxbitmaps>-tdobject
            grname                   = <g_stxbitmaps>-tdname   " Name in screen field "Name"
            grid                     = <g_stxbitmaps>-tdid
            grtype                   = <g_stxbitmaps>-tdbtype
       importing
            e_task                   = l_task
       exceptions
            transport_impossible     = 1
            nothing_found            = 2
            others                   = 3.

0 Kudos
1,912

Hey sandra.rossi,

I'd try this but did not work. My requirement is to select all the images.

Selecting multiple images and uploading it did not work.

Regards,

Alex Dsouza

0 Kudos
1,912

With SE78, you can select only one image at a time, so why do you want to use it?

What "did not work" exactly?

0 Kudos
1,912

I can't get past why one would want to mass upload images using BD78 in the first place...

0 Kudos
1,912

spartans007 Okay, I fixed the bug and edited the code above. This one works. Apologies for the confusion. Now it works well.

0 Kudos
1,912

Hello sandra.rossi

I tried the program you gave me. But if you see below, my requirement is to select all the images and upload it in single go.

I am able to upload 1 image at a time. But i tried many ways to select all the images and upload them but could not do it.

If possible can you please help me selecting all the images in the directory and upload them in one go?

Thank you.

0 Kudos
1,912

You do a batch input which runs the ABAP program multiple times, once per image to upload.

0 Kudos
1,912

Can't create a functional batch input / recording for SE78 as the tree control is not supported by batch inputs.

1,912

It's not on SE78 that you run the batch input, you run it on the program above.

For instance, if you use SE38 to run the program, you do the batch input on SE38.

Sorry if it was unclear.

0 Kudos
1,912

Ok i will try this

0 Kudos
1,912

Hey sandra.rossi ,

Thank you. That program worked for me.
But i have a question regarding it. How to i automate the process of adding those se78 uploaded graphics to a transport request?


Regards,

Alex

0 Kudos
1,912

Hello,

did you search a bit ? It"s not very complicated...
A clue : See function RS_CORR_INSERT 🙂

1,912

Thanks for the feedback.

Good question, you have to call the function module 'SAPSCRIPT_TRANSPORT_OBJECTS'. Answer edited.