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

Error while running BDC in Background

Former Member
0 Likes
1,318

Hi,

I am using BDC for a custom transaction YMMFGC. The operation that I am acheiving using this transaction is updating Materials from SalesOrg/Dist Chnl to another SalesOrg/Dist Chnl. When I am trying to run the Program in Foreground in No Screens Mode or Visible screen navigations, the data is getting updated in the MVKE table. Extension is verified for in this table. But when I try to run the program in the background, the job is getting finished successfully, but the data is not getting updated in the table. Please suggest how to proceed with this.

Thanks!!!

ChK

11 REPLIES 11
Read only

Former Member
0 Likes
1,114

How are you trying to upload your data for the BDC Session? A search of the forum on similar threads would provide a solution for you.

Read only

0 Likes
1,114

I am using a CALL TRANSACTION...

Read only

0 Likes
1,114

Where is the data coming from that you are updating From/To? Are you trying to Upload a File? If you are trying to Upload a File, how are you doing it?

Read only

kanishakgupta1
Contributor
0 Likes
1,114

i suggest u to debug the background job.

in sm37,select the job and type JDBG in the ok-code and press enter.

regards

kanishak

Read only

0 Likes
1,114

I have debugged the job and getting SY-SUBRC Value as 1001 and also, E_GROUP as Space, so this below piece of code is getting executed, because of which the table is not getting updated. SY-SUBRC is zero and E_GROUP is Space for executing in foreground with no screens mode and Mode as 'P'. How to solve this issue.

IF L_SUBRC <> 0 AND E_GROUP <> SPACE.

IF E_GROUP_OPENED = ' '.

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = E_GROUP

USER = E_USER

KEEP = E_KEEP

HOLDDATE = E_HDATE.

E_GROUP_OPENED = 'X'.

ENDIF.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = TCODE

TABLES

DYNPROTAB = BDCDATA.

ENDIF.

ChK

Edited by: Harsha Cheruku on Jun 18, 2009 12:25 PM

Read only

0 Likes
1,114

Write your BDC_OPEN_GROUP in the following manner..

p_group - Name of BDC session

  • p_keep - set to 'X' to keep session after process

  • p_user - User ID for authorizations

  • p_subrc - returned status.



  CALL FUNCTION 'BDC_OPEN_GROUP'
       EXPORTING
            client            = sy-mandt
            group             = p_group
            keep              = p_keep
            user              = p_user
       IMPORTING
            qid               = p_qid
       EXCEPTIONS
            client_invalid    = 1
            group_invalid     = 3
            group_is_locked   = 4
            running           = 8
            system_lock_error = 9
            user_invalid      = 10
            OTHERS            = 11.

also..what does update mode 'P' means..it should be either 'S' or 'A' or 'L'..

Check below...



ctumode LIKE ctu_params-dismode
  "          A: show all dynpros
  "          E: show dynpro on error only
  "          N: do not display dynpro

cupdate LIKE ctu_params-updmode 
  "          S: synchronously
  "          A: asynchronously
  "          L: local

  TRANSLATE: p_tcode  TO UPPER CASE,
             ctumode   TO UPPER CASE,
             cupdate TO UPPER CASE.

  CALL TRANSACTION p_tcode USING         p_tb_bdc
                           MODE          ctumode
                           UPDATE        cupdate
                           MESSAGES INTO p_tb_bdcmsg.

Read only

0 Likes
1,114

Hi Vin,

I have all those details in Place still it is not working. I got to know there will be problem if there are table controls in a transaction. Is it true? My custom transaction has around 3-4 table controls. If it is true, is it possible to solve the issue or not?

ChK

Read only

0 Likes
1,114

This message was moderated.

Read only

0 Likes
1,114

Hi Vin,

I just want to update that the BDC I am using is having a Problem only when i am trying to run the program in background, but when I am running it in foreground with no Screens Mode or A or E, the table is getting updated.So will the table control throw problems only when we are trying to run it in the background mode???

Thank you for the links.

ChK

Read only

0 Likes
1,114

I do not have a great idea on this....

But from what I have searched in Google and SDN...it looks like there will be problem...

Please refer the below thread..

Read only

0 Likes
1,114

Hi Vin,

Thank you very much for the help!!!! I Really appreciate your effort in helping me.

ChK