Skip to Content
author's profile photo Former Member
Former Member

BDC not running in Production

Hi all,

I have a problem with BDC for a tcode CAA2 in ISU module which runs successfully both in background and foreground in Quality but on running it in Production, it does not run at all. I checked in foreground mode, the command box is not visible and the data is also not uploaded in the called screen.

Please note that there was no failed authorisation also.

Can someone help?

I am writing down the code below:

report ZISUBDC_CAA2

no standard page heading line-size 255.

TABLES T100.

DATA L_MSTRING TYPE T100-TEXT.

DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

DATA G_TEXT(2).

DATA G_INDEX TYPE I.

DATA: IT_EXCEL TYPE STANDARD TABLE OF KCDE_CELLS WITH HEADER LINE.

TYPES : BEGIN OF TY_DATA,

VKONT TYPE VKONT_KK,

GPART TYPE GPART_KK,

END OF TY_DATA.

DATA IT_DATA TYPE STANDARD TABLE OF TY_DATA WITH HEADER LINE.

PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.

PERFORM GET_FILE_NAME.

start-of-selection.

CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'

EXPORTING

FILENAME = P_FILE

I_BEGIN_COL = '1'

I_BEGIN_ROW = '2'

I_END_COL = '2'

I_END_ROW = '500'

TABLES

INTERN = IT_EXCEL

  • EXCEPTIONS

  • INCONSISTENT_PARAMETERS = 1

  • UPLOAD_OLE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

FIELD-SYMBOLS <FS>.

************************************************************************

  • Moving data from Internal table IT_EXCEL to internal table

  • IT_LINE with actual field

************************************************************************

IF IT_EXCEL[] IS INITIAL.

G_TEXT = 'No Data Uploaded'.

ELSE.

SORT IT_EXCEL BY ROW COL.

LOOP AT IT_EXCEL.

MOVE : IT_EXCEL-COL TO G_INDEX.

ASSIGN COMPONENT G_INDEX OF STRUCTURE IT_DATA TO <FS>.

MOVE IT_EXCEL-VALUE TO <FS>.

AT END OF ROW.

IF NOT IT_DATA IS INITIAL.

APPEND IT_DATA .

CLEAR IT_EXCEL.

CLEAR IT_DATA.

ENDIF.

ENDAT.

ENDLOOP.

ENDIF.

LOOP AT IT_DATA.

REFRESH BDCDATA.

REFRESH MESSTAB.

PERFORM MAP_DATA.

CALL TRANSACTION 'CAA2' USING BDCDATA

MODE 'A'

MESSAGES INTO MESSTAB.

PERFORM GET_MESSAGES.

ENDLOOP.

FORM MAP_DATA.

perform bdc_dynpro using 'SAPLBUSS' '5003'.

perform bdc_field using 'BDC_OKCODE'

'=BUSE'.

perform bdc_field using 'BDC_CURSOR'

'FKKVKP-GPART'.

perform bdc_field using 'FKKVKP-VKONT'

IT_DATA-VKONT.

perform bdc_field using 'FKKVKP-GPART'

IT_DATA-GPART.

perform bdc_dynpro using 'SAPLBUSS' '0005'.

perform bdc_field using 'BDC_OKCODE'

'=BUSS'.

perform bdc_field using 'BDC_CURSOR'

'FKKVKP-IKEY'.

perform bdc_field using 'FKKVKP-IKEY'

'03'.

ENDFORM.

&----


*& Form GET_FILE_NAME

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM GET_FILE_NAME .

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

DYNPRO_NUMBER = SYST-DYNNR

FIELD_NAME = 'P_FILE'

IMPORTING

FILE_NAME = P_FILE

.

ENDFORM. " GET_FILE_NAME

----


  • Start new screen *

----


FORM BDC_DYNPRO USING PROGRAM DYNPRO.

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

ENDFORM.

----


  • Insert field *

----


FORM BDC_FIELD USING FNAM FVAL.

  • IF FVAL <> NODATA.

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

  • ENDIF.

ENDFORM.

&----


*& Form GET_MESSAGES

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM GET_MESSAGES .

LOOP AT MESSTAB WHERE MSGTYP = 'E'.

.

SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR.

IF SY-SUBRC = 0.

L_MSTRING = T100-TEXT.

IF L_MSTRING CS '&1'.

REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.

REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.

REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.

REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.

ELSE.

REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.

REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.

REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.

REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.

ENDIF.

ENDIF.

CONDENSE L_MSTRING.

FORMAT COLOR 2 ON.

  • WRITE /.

WRITE: 1 SY-VLINE,

L_MSTRING UNDER 'Error Messages' .

ULINE.

ENDLOOP.

ENDFORM. " GET_MESSAGES

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Aug 16, 2007 at 07:54 AM

    Hi,

    In QTY & PRD are in same patch level? Its is weird in PRD it is not running?

    Try to run in debug mode

    aRs

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 16, 2007 at 09:48 AM

    Hi,

    check u have authorization for CAA2 in production or not??some times u may not be able to see the fields due to this..Also Screen setting may vary from system to sytems .

    Regards,

    nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 06:53 AM

    done

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.