2007 Mar 13 1:15 PM
Dear Experts,
After executing the code I am getting a message in program RSBDCSUB as 'Processing is not permitted. Session has lock date in the future.'
Please check the code below and help me solve this problem.
&----
*& Form f_bdc
&----
Subroutine to perform bdc
----
form f_bdc.
perform open_group.
loop at it_ps_psa.
perform bdc_dynpro using 'SAPMP50A' '2000'.
perform bdc_field using 'BDC_CURSOR'
'T529T-MNTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
perform bdc_field using 'RP50G-PERNR'
it_ps_psa-pernr.
perform bdc_field using 'RP50G-EINDA'
v_begda.
perform bdc_field using 'RP50G-SELEC(01)'
'X'.
perform bdc_dynpro using 'MP000000' '2000'.
perform bdc_field using 'BDC_CURSOR'
'P0000-MASSG'.
perform bdc_field using 'BDC_OKCODE'
'UPD'.
perform bdc_field using 'P0000-MASSN'
'02'.
perform bdc_field using 'P0000-MASSG'
'R1'.
perform bdc_field using 'PSPAR-WERKS'
it_ps_psa-werks.
perform bdc_dynpro using 'MP000100' '2000'.
perform bdc_field using 'BDC_CURSOR'
'P0001-BTRTL'.
perform bdc_field using 'BDC_OKCODE'
'UPD'.
perform bdc_field using 'P0001-BTRTL'
it_ps_psa-btrtl.
perform bdc_dynpro using 'SAPMP50A' '2000'.
perform bdc_field using 'BDC_OKCODE'
'/EBCK'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-PERNR'.
perform bdc_transaction using 'PA40'.
clear bdcdata.
refresh bdcdata.
endloop.
perform close_group.
endform.
&----
*& Form f_conversion_exit
&----
Subroutine to perform conversion exit on date
----
form f_conversion_exit.
CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
EXPORTING
INPUT = p_begda
IMPORTING
OUTPUT = v_begda
.
endform.
----
Start new transaction according to parameters *
----
FORM BDC_TRANSACTION USING TCODE.
batch input session
CALL FUNCTION 'BDC_INSERT'
EXPORTING TCODE = TCODE
TABLES DYNPROTAB = BDCDATA.
REFRESH BDCDATA.
ENDFORM.
----
Start new screen *
----
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
----
Insert field *
----
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. "BDC_FIELD
----
create batchinput session *
(not for call transaction using...) *
----
FORM OPEN_GROUP.
open batchinput group
data: group(12).
group = 'ps_psa'.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = group
USER = SY-UNAME
KEEP = 'X'
HOLDDATE = SY-DATUM.
ENDFORM.
----
end batchinput session *
(call transaction using...: error session) *
----
FORM CLOSE_GROUP.
close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
ENDFORM.
regards and thanks in advance
Abdullah
2007 Mar 13 1:21 PM
Hello Abdullah,
Make the change like this:
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = group
USER = SY-UNAME
KEEP = 'X'
*HOLDDATE = SY-DATUM. " Check here
If useful reward.
Vasanth
2007 Mar 13 1:17 PM
Hi,
Check your system date,
because in the fun module
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = group
USER = SY-UNAME
KEEP = 'X'
HOLDDATE = SY-DATUM.
ENDFORM.
Hold date is taking sy-datum.
if this date is in future then this error comes.
Regards,
Anji
2007 Mar 13 1:18 PM
Hi abdullah,
1. For that session, the Lock Date (Start Date)
is in future.
Before that date, the system will not allow to run that particular session.
regards,
amit m.
2007 Mar 13 1:21 PM
Hello Abdullah,
Make the change like this:
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = group
USER = SY-UNAME
KEEP = 'X'
*HOLDDATE = SY-DATUM. " Check here
If useful reward.
Vasanth