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

doubt in BDC

Former Member
0 Likes
766

Hi

I have a BDC program when I run it with generate seesion option it is creating the session and when i execute it from sm35 everything is working fine. But when i run the bdc using call transaction mode it is not working as per the expectation. Anyway is there any that i can do in program so that i do not need to go to sm35 and execute the session. I mean the program itself should be able to find the seeion and process it internally.

Also I want to provide an option to the user in selection screen to upload the file from the computer, like when user clicks F4 the file browser screen should appear and the selected file shoud transfer to the selection screen. how can i do that. I have tried using the cl_gui_frontend_services , but no use...

thanks

sankar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
748

Use the Standard Program RSBDCSUB to execute the Session automatically


SUBMIT rsbdcsub WITH mappe = p_sesion(your session name)
WITH von = sy-datum
WITH bis = sy-datum
WITH z_verarb = 'X' AND RETURN.

Hi

I have a BDC program when I run it with generate seesion option it is creating the session and when i execute it from sm35 everything is working fine. But when i run the bdc using call transaction mode it is not working as per the expectation. Anyway is there any that i can do in program so that i do not need to go to sm35 and execute the session. I mean the program itself should be able to find the seeion and process it internally.

Also I want to provide an option to the user in selection screen to upload the file from the computer, like when user clicks F4 the file browser screen should appear and the selected file shoud transfer to the selection screen. how can i do that. I have tried using the cl_gui_frontend_services , but no use...

thanks

sankar

7 REPLIES 7
Read only

Former Member
0 Likes
749

Use the Standard Program RSBDCSUB to execute the Session automatically


SUBMIT rsbdcsub WITH mappe = p_sesion(your session name)
WITH von = sy-datum
WITH bis = sy-datum
WITH z_verarb = 'X' AND RETURN.

Read only

Former Member
0 Likes
748

you have to use call transaction instead of batch input.

you need to fill the bdc_tab table and then the sentence call transaction 'XXX' using bdc_tab mode 'N'.

Mode N: no display of screens, if you want to see the screens change to mode = A.

For browser the file, you can try F4_FILENAME.

Hope it helps!

Jen

Read only

0 Likes
748

Hi

thanks for ur reply

f4_filename has inport parameters program and dynpro no . I am developing a report program where there is a parameter varaible for this variable i want to attach the F4 help with the file searching capability??

thanks

sankar

Read only

0 Likes
748

you have 3 parameters in F4_filename: program, dynpro and field_name.

In field_name pass the name of the variable in your screen (for example 'P_FILE')

Create the event AT-SELECTION SCREEN ON VALUE REQUEST FOR p_file.

--> here you can call the F4_filename.

Read only

0 Likes
748

Hi

my code is as shoen below:

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = 'ysample'

DYNPRO_NUMBER = '1000'

FIELD_NAME = p_file1

IMPORTING

FILE_NAME = table_file.

when i click on F4 the file browsing window is openinf but when i select a file and click on open it is not transferring the fle path to p_file parameter. Instead it says " no session found".

thanks

sankar

Read only

0 Likes
748

Try this code:

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = 'YSAMPLE' "-->always in capitals

DYNPRO_NUMBER = '1000'

FIELD_NAME = 'P_FILE1' "--> here is the name,not the content

IMPORTING

FILE_NAME = p_file1. "--> here is the variable

hope this runs correctly!

Read only

Former Member
0 Likes
748

Use this piece of code that it will not go to SM35. it will process the session internally


FORM SUBMIT BATCH
  SUBMIT rsbdcsub VIA SELECTION-SCREEN AND  RETURN
      WITH mappe  = p_bdcgrp       " Session name
      WITH von    = sy-datum       " Date
      WITH fehler = space.
ENDFORM.

<REMOVED BY MODERATOR>

Thanks

Edited by: Alvaro Tejada Galindo on Feb 22, 2008 2:33 PM