Application Development 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 SESSION processing

Former Member
0 Kudos

Hi Experts,

I have a small doubt in BDC session processing. How to HARD CODE the session processing( all possible ways of processing session) in the program without forcing the user to process the session without the need for the user to go to SM35 and process it.

Thanks & Regards,

Ram.

4 REPLIES 4

former_member181962
Active Contributor
0 Kudos

HI ram,

It is not exactly hard coding. You have tio submit the program RSBDCSUB in your BDC program to process the session without going to SM35.

REfer this thread:

Regards,

Ravi

Former Member
0 Kudos

Former Member
0 Kudos

Call the following souroutine after creating creating & closing session in ur program.

Here 'c_bdcname' , you pass the session name ur generating.

&----


*& Form bdc_submit

&----


  • Process the sessions created

----


FORM bdc_submit .

SUBMIT rsbdcsub AND RETURN EXPORTING LIST TO MEMORY

WITH mappe = c_bdcname

WITH z_verarb = 'X'

WITH fehler = ' '.

COMMIT WORK AND WAIT.

  • Retrieve the output from memory and place into l_abap_list

CLEAR l_abap_list.

FREE l_abap_list.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = l_abap_list

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc EQ 0.

CLEAR l_ascii_list.

FREE l_ascii_list.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

list_index = -1

TABLES

listasci = l_ascii_list

listobject = l_abap_list

EXCEPTIONS

empty_list = 1

list_index_invalid = 2

OTHERS = 3.

IF sy-subrc NE 0.

  • 'Unable to convert list from rsbdcsub to ascii'

MESSAGE w368 WITH text-010.

ENDIF.

ENDIF.

ENDFORM. " bdc_submit

Former Member
0 Kudos

KB ram,

use the program RSBDCSUB.

After "BDC_INSERT"

SUBMIT rsbdcsub AND RETURN

EXPORTING LIST TO MEMORY

WITH mappe = p_sessionnanme

WITH von = w_datum

WITH bis = sy-datum

WITH z_verarb = c_true

WITH fehler = c_false

Pls. mark if useful