Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2878

BDC Update Issue

$
0
0

Hi,

                        I am having a weird problem in BDC. I am running a batch job every day in the production to perform Employee actions (Hiring, Job Change E.T.C) using an interface. The actual file comes from ADP. At some point in the program, I create a new position and I assign this position to create a new employee or perform a job change. For some reasons, after the position creation  BDC , the database table is not getting updated with the data . I am using a select statement right after the BDC to fetch the created position and assign it to the new employee as shown below. The Select statement Fails because it doesn't finds any record.  This is working fine in the foreground , Only batch jobs are failing . I Wonder Why ?  I even added COMMIT WORK, even though it is not related but No Luck.         

             

 

 

PERFORM bdc_transaction USING 'PP01'
CHANGING p_msg.

COMMIT WORK.

**** Create Relation-ships and Employee Group/ Sub group
** Read the Created Position from the Databse.
CLEAR : lv_objid.

SELECT otype objid INTO TABLE gt_pos
FROM hrp1000
WHERE plvar = '01'
AND   otype = 'S'
AND   istat = '1'
AND   endda = '99991231'
AND   aedtm = sy-datum
AND   uname = sy-uname
AND   short = lv_short.
IF sy-subrc = 0.

 

ENDIF.

 

 

 

FORM bdc_transaction  USING    tran

                       CHANGING p_msg TYPE  bdcmsgcoll .

 

DATA: p_mode TYPE CHAR1.

CLEAR: p_mode.

 

p_mode = 'N'.

 

  CALL TRANSACTION tran USING it_bdcdata

                                 MODE p_mode

                                 UPDATE 'S'

                                 MESSAGES INTO i_msg.

      REFRESH it_bdcdata.

 

 

 

ENDFORM.


Viewing all articles
Browse latest Browse all 2878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>