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

SUBMIT RSBDCSUB in a program after a BDC_INSERT doesn't work

FredericGirod
Active Contributor
0 Likes
1,504

Hi,

I have a program with create a batch-input, after the call function BDC_INSERT, I use a SUBMIT RSBDCSUB to call the execution of the BI.

My problem is, the batch still doesn't exist when I call the program. This problem only occurs in one server, the productive server.

Do you have already facing this problem ?

Fred

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
1,152

You need to use that SUBMIT RSBDCSUB after the BDC_CLOSE FM.Because session is not yet created fully till the BDC_CLOSE is not executed.

Regards,

Naimesh Patel

Hi,

I have a program with create a batch-input, after the call function BDC_INSERT, I use a SUBMIT RSBDCSUB to call the execution of the BI.

My problem is, the batch still doesn't exist when I call the program. This problem only occurs in one server, the productive server.

Do you have already facing this problem ?

Fred

7 REPLIES 7
Read only

naimesh_patel
Active Contributor
0 Likes
1,153

You need to use that SUBMIT RSBDCSUB after the BDC_CLOSE FM.Because session is not yet created fully till the BDC_CLOSE is not executed.

Regards,

Naimesh Patel

Read only

0 Likes
1,152

Sorry, I have also the BDC_CLOSE_GROUP.

Here my code, I have add a COMMIT ... to test.



  DATA : w_nom      TYPE apq_grpn ,
         w_kbetr(16) ,
         w_datab(10) ,
         w_datbi(10) ,
         w_kpein(5)  ,
         w_kmein(3)  .


  CHECK is_data-flag EQ 'A' OR
        is_data-flag EQ 'B' OR
        is_data-flag EQ 'C'.


  REFRESH itg_bdcdata.


* Batch-input name.
  CONCATENATE 'Hauss_'
              sy-uzeit
*              is_data-knumh+4(6)
              INTO w_nom.


* Open Batch-input.
  PERFORM p_open_bdc USING w_nom.


* Choix type cond.
  PERFORM p_bdc_dynpro      USING 'SAPMV13A'
                                  '0100'.
  PERFORM p_bdc_field       USING 'BDC_OKCODE'
                                  '=ANTA'.
  PERFORM p_bdc_field       USING 'RV13A-KSCHL'
                                  gw_kschl.

* Choix de la clef.
  PERFORM p_bdc_dynpro      USING 'SAPLV14A'
                                  '0100'.
  PERFORM p_bdc_field       USING 'BDC_OKCODE'
                                  '=WEIT'.
  PERFORM p_bdc_field       USING 'RV130-SELKZ(01)'
                                  'X'.

* Enregistre la nouvelle condition.
  PERFORM p_bdc_dynpro      USING 'SAPMV13A'
                                  '1510'.
  PERFORM p_bdc_field       USING 'BDC_OKCODE'
                                  '=SICH'.
  PERFORM p_bdc_field       USING 'KOMG-VKORG'
                                  is_data-vkorg.
  PERFORM p_bdc_field       USING 'KOMG-VTWEG'
                                  is_data-vtweg.
  PERFORM p_bdc_field       USING 'KOMG-KUNNR'
                                  is_data-kunnr.
  PERFORM p_bdc_field       USING 'KOMG-MATNR'
                                  is_data-matnr.
  PERFORM p_bdc_field       USING 'KOMG-WERKS'
                                  is_data-werks.
  PERFORM p_bdc_field       USING 'KOMG-AUART_SD'
                                  is_data-auart_sd.
  PERFORM p_bdc_field       USING 'KOMG-INCO1(01)'
                                  is_data-inco1.
  WRITE is_data-kbetr2 TO w_kbetr.
  PERFORM p_bdc_field       USING 'KONP-KBETR(01)'
                                  w_kbetr.
  WRITE is_data-kpein TO w_kpein.
  PERFORM p_bdc_field       USING 'KONP-KPEIN(01)'
                                  w_kpein.
  WRITE is_data-kmein TO w_kmein.
  PERFORM p_bdc_field       USING 'KONP-KMEIN(01)'
                                  w_kmein.
  WRITE is_data-datab TO w_datab.
  PERFORM p_bdc_field       USING 'RV13A-DATAB(01)'
                                  w_datab.
  WRITE is_data-datbi TO w_datbi.
  PERFORM p_bdc_field       USING 'RV13A-DATBI(01)'
                                  w_datbi.

* Save the transaction.
  PERFORM p_insert_bdc USING 'VK11'.

* Close the Batch-input..
  PERFORM p_close_bdc.


  COMMIT WORK AND WAIT.

  SUBMIT rsbdcsub WITH mappe = w_nom
                  WITH von   = sy-datum
                  WITH bis   = sy-datum
                  EXPORTING LIST TO MEMORY
                  AND RETURN.

Read only

0 Likes
1,152

Comment this statement and try.

COMMIT WORK AND WAIT.

Regards,

Satish

Read only

0 Likes
1,152

I have add this statement to test, before it was not here, and that didn't work.

another idea ?

(I repeat, in other machine, not productive, the solution work well)

thanks

Read only

0 Likes
1,152

Hi

It's really strange situation,

Can you see the session in SM35 after some time? (Just i want to make sure BDC_CLOSE_GROUP executed with out any exceptions)

Read only

0 Likes
1,152

In productive, in debug, I see everything is ok at the BDC_CLOSE_GROUP. The submit doesn't find anything (sm35 is empty). And when I finish the debug (not the program, it's a cockpit) the BDC appears in the SM35.

Read only

Former Member
0 Likes
1,152

First you need CLOSE the BDC using DC_CLOSE_GROUP

Pavan

Message was edited by:

Pavan Kothapalli