‎2007 Jun 11 2:03 PM
Hi all,
i developed a bdc program for transaction aco3. (sesion method).
its working fine. i transported it to production client. wen i run the bdc. session is created. wen i process the sesion in foreground it is taking to aco3 transaction,here values are not populating.its showing the message fill the required fields.
the same file i gave it in development its working fine.
program is below
include bdcrecx1.
parameters: filename like rlgrap-filename.
data: begin of record,
ASNUM(18),
ASKTX(40),
ASTYP(4),
MEINS(3),
MATKL(6),
BKLAS(4),
end of record.
data: itab_program like record occurs 0 with header line.
***
****************************************************
At Selection Screen
****************************************************
at selection-screen on value-request for filename.
perform query_filename changing filename.
****************************************************
*START-OF-SELECTION
*****************************************************
start-of-selection.
*-- Upload flat data to ITAB.
perform upload_to_itab.
*{ chg001 -- modified as per requirement
perform open_group.
loop at itab_program.
perform upload_programs.
endloop.
perform close_group.
----
FORM UPLOAD_TO_ITAB *
----
........ *
----
form upload_to_itab.
call function 'WS_UPLOAD'
exporting
CODEPAGE = ' '
filename = filename
filetype = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
tables
data_tab = itab_program
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10
.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
write : 'File opening error.'.
endif.
endform.
----
FORM QUERY_FILENAME *
----
........ *
----
--> P_FILENAME *
----
form query_filename changing p_filename.
data : tmp_filename like filename.
call function 'WS_FILENAME_GET'
exporting
def_filename = filename
mask = ',.txt,.txt.'
mode = 'O'
title = 'Select the file to Upload'
importing
filename = tmp_filename
exceptions
inv_winsys = 01
no_batch = 02
selection_cancel = 03
selection_error = 04.
if sy-subrc = 0.
filename = tmp_filename.
endif.
endform.
*******************************************
*perform open_group.
&----
*& Form UPLOAD_programs
&----
text
----
--> p1 text
<-- p2 text
----
form upload_programs.
perform bdc_dynpro using 'SAPLBAS0' '0300'.
perform bdc_field using 'BDC_CURSOR'
'ASMD-ASNUM'.
perform bdc_field using 'BDC_OKCODE'
'=NEW'.
perform bdc_field using 'RM63T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPLBAS0' '0300'.
perform bdc_field using 'BDC_CURSOR'
'ASMD-MATKL'.
perform bdc_field using 'BDC_OKCODE'
'=POST'.
perform bdc_field using 'ASMD-ASNUM'
itab_program-ASNUM.
perform bdc_field using 'ASMDT-ASKTX'
itab_program-ASKTX.
perform bdc_field using 'ASMD-ASTYP'
itab_program-ASTYP.
perform bdc_field using 'ASMD-MEINS'
itab_program-MEINS.
perform bdc_field using 'ASMD-MATKL'
itab_program-MATKL.
perform bdc_field using 'ASMD-BKLAS'
itab_program-BKLAS.
perform bdc_dynpro using 'SAPLBAS0' '0300'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'ASMD-ASNUM'.
perform bdc_dynpro using 'SAPLSPO1' '0100'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_transaction using 'AC03'.
endform. " UPLOAD_programs
can any body help me in this regard.
thanks in advance
siva
‎2007 Jun 11 2:07 PM
Hi Siva,
Compare the screen numbers in development and production servers. I had this problem once.
Thanks
Aneesh.
‎2007 Jun 11 2:11 PM
hi,
ya siva is right .i already had this problem once............
check ur screen..................
otherwise check the sequence of fields in the flat file and bdc recording.............
Reward points if helpful,
Regards,
Imran
‎2007 Jun 11 2:19 PM
hi all,
thanks for ur replies,
how to find whether the field is mandatory or not.
if a field is mandatory then wat is the procedure
‎2007 Jun 11 2:27 PM
Hi Siva,
Go to that transaction manually and see if there is a tick mark in that field which means that the field is mandatory.
And if that is mandatory then find out what needs to be filled in that field. If that is a constant value, hard-code it into your program or you have to ask ppl to give that field also in the data file.
Thanks
Aneesh.
‎2007 Jun 11 2:39 PM
hi aneesh thanx for ur reply,
here service category is the mandatory field . ia m populating values for this field.but its not working.
‎2007 Jun 11 2:41 PM
Hi Siva,
Can you give me the exact error which it is showing??
Thanks
Aneesh.
‎2007 Jun 11 2:44 PM
hi,
after processing the session in foreground. its taking to ac03 transaction, there its asking fill in required fields.
i did debugging. noting problem in it.
‎2007 Jun 11 2:48 PM
Hi Siva,
Try filling in the fields manually with the data you have been provided. If you are able to do that, then I can think of only one problem. Check the screen numbers b/w your development server and your production server. See if there is any change.
Thanks
Aneesh.
‎2007 Jun 11 2:09 PM
Hi,
It is because of some customization problems.
Make a note of the fields which are mandatory on production system and populate the fields in the program in development system.
Regards
Sailaja.
‎2007 Jun 11 2:10 PM
Hi,
if it is working in development clinet ,it should work in production...Do u have access in production client???
compare the program in the development and production server.Check if anything changed in development might not reflected in the production.check all the includes in the development and prodduction.
Regards,
Nagaraj