‎2009 Jun 17 6:16 PM
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
‎2009 Jun 17 6:27 PM
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.
‎2009 Jun 17 7:00 PM
‎2009 Jun 17 7:13 PM
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?
‎2009 Jun 17 11:00 PM
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
‎2009 Jun 18 11:25 AM
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
‎2009 Jun 18 12:06 PM
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.
‎2009 Jun 19 7:43 AM
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
‎2009 Jun 19 8:39 AM
‎2009 Jun 19 9:12 AM
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
‎2009 Jun 19 9:25 AM
‎2009 Jun 19 11:13 AM
Hi Vin,
Thank you very much for the help!!!! I Really appreciate your effort in helping me.
ChK