Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Start Screen doesn't exist error

Former Member
0 Likes
2,589

Hi all ,

          I got the error as "start screen doesn't exist" while i was executing in bdc.I have used the transaction "xk01".

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,050

Hello.

when you are using a batch input, dont need to write BDC_CURSOS...

perform bdc_field       using 'BDC_CURSOR'

                              'RF02K-KTOKK'.


Also, your BDC is not correct. Check the estructure, look this:


  PERFORM insert_line USING:

     'X'   'SAPMF02K'    '0100',

     ' '   'RF02K-BUKRS'   t_input-bukrs,

     ' '   'RF02K-KTOKK'   t_input-ktokk,

     ' '   'RF02K-EKORG'   t_input-ekorg,

     ' '   'BDC_OKCODE'    '/00'.

FORM INSERT_LINE USING

               X_L_START TYPE C X_L_NAME TYPE C X_L_VALUE TYPE ANY.

  DATA: H_BDC_AUX LIKE BDCDATA.

  ASSIGN H_BDC TO <TABLES_BDC>.

  MOVE X_L_START TO H_BDC_AUX-DYNBEGIN.

  IF X_L_START = 'X'.

    MOVE:

      X_L_NAME  TO H_BDC_AUX-PROGRAM,

      X_L_VALUE TO H_BDC_AUX-DYNPRO.

  ELSE.

    MOVE:

      X_L_NAME  TO H_BDC_AUX-FNAM,

      X_L_VALUE TO H_BDC_AUX-FVAL.

  ENDIF.

  APPEND H_BDC_AUX TO <TABLES_BDC>-TABLES.

ENDFORM.

FIELD-SYMBOLS: <TABLES_BDC> TYPE TYPE_BDC.

    CALL TRANSACTION 'XK01' USING <TABLES_BDC>-TABLES

                             MODE PC_MODE

                             UPDATE 'S'

                             MESSAGES INTO MESSTAB.

Regards

Miguel

16 REPLIES 16
Read only

Former Member
0 Likes
2,050

Hi,

Check with the recording and BDCDATA internal table.

Share your code so that we can identify the error.

Read only

0 Likes
2,050

   report ZBDC_VENDOR_UPLOAD
       no standard page heading line-size 255.

INCLUDE bdcrecx1.

TYPES: BEGIN OF TY_FINAL,
       LIFNR TYPE LIFNR,
       EKORG TYPE EKORG,
       KTOKK TYPE KTOKK,
       NAME1 TYPE NAME1,
       SORTL TYPE SORTL,
       LAND1 TYPE LAND1,
       END OF TY_FINAL.

DATA: IT_FINAL TYPE TABLE OF TY_FINAL,
*      IT_LFA1 TYPE TABLE OF TY_FINAL,
      IT_BDCDATA TYPE TABLE OF BDCDATA.

DATA: WA_FINAL TYPE TY_FINAL,
*      WA_LFA1 TYPE TY_LFA1,
      WA_BDCDATA TYPE BDCDATA.
*DATA : V_FILE TYPE STRING.
*DATA : T_FILE TYPE RLGRAP-FILENAME.

start-of-selection.
perform open_group.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    filename                      = 'C:\VENDOR.TXT'
*   FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
*   HEADER_LENGTH                 = 0
*   READ_BY_LINE                  = 'X'
*   DAT_MODE                      = ' '
*   CODEPAGE                      = ' '
*   IGNORE_CERR                   = ABAP_TRUE
*   REPLACEMENT                   = '#'
*   CHECK_BOM                     = ' '
*   VIRUS_SCAN_PROFILE            =
*   NO_AUTH_CHECK                 = ' '
* IMPORTING
*   FILELENGTH                    =
*   HEADER                        =
  tables
    data_tab                      = IT_FINAL.


IF sy-subrc = 0.
  MESSAGE 'DATA UPLOADED SUCESSFULLY' TYPE 'I'.
ENDIF.


LOOP AT IT_FINAL INTO WA_FINAL.
perform bdc_dynpro      using 'SAPMF02K' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-KTOKK'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RF02K-LIFNR'
                              WA_FINAL-LIFNR.
perform bdc_field       using 'RF02K-EKORG'
                              WA_FINAL-EKORG.
perform bdc_field       using 'RF02K-KTOKK'
                              WA_FINAL-KTOKK.
perform bdc_dynpro      using 'SAPMF02K' '0110'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-LAND1'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-NAME1'
                              WA_FINAL-NAME1.
perform bdc_field       using 'LFA1-SORTL'
                              WA_FINAL-SORTL.
perform bdc_field       using 'LFA1-LAND1'
                              WA_FINAL-LAND1.
perform bdc_dynpro      using 'SAPMF02K' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-KUNNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=UPDA'.
*perform bdc_transaction using 'XK01'.

CALL TRANSACTION 'XK01' USING IT_FINAL MODE 'A' UPDATE 'S'.
REFRESH IT_FINAL.
perform close_group.
ENDLOOP.

**----------------------------------------------------------------------*
**        Start new screen                                              *
**----------------------------------------------------------------------*
*FORM BDC_DYNPRO USING PROGRAM DYNPRO.
*  CLEAR WA_BDCDATA.
*  WA_BDCDATA-PROGRAM  = PROGRAM.
*  WA_BDCDATA-DYNPRO   = DYNPRO.
*  WA_BDCDATA-DYNBEGIN = 'X'.
*  APPEND WA_BDCDATA TO IT_BDCDATA.
*ENDFORM.
*
**----------------------------------------------------------------------*
**        Insert field                                                  *
**----------------------------------------------------------------------*
*FORM BDC_FIELD USING FNAM FVAL.
**  IF FVAL <> NODATA.
*    CLEAR WA_BDCDATA.
*    WA_BDCDATA-FNAM = FNAM.
*    WA_BDCDATA-FVAL = FVAL.
*    APPEND WA_BDCDATA TO IT_BDCDATA.
**  ENDIF.
*ENDFORM.

Read only

0 Likes
2,050

Where are you passing bdcdata internal table.in call transaction??? you are passing it_final please check

Read only

0 Likes
2,050

Hi nabheet,

               where should i pass this internal table,can u figure me out.

Thanks.

Read only

0 Likes
2,050

In CALL Transaction dont use IT_FINAL use BDCDATA.

Read only

0 Likes
2,050

CALL TRANSACTION 'XK01'

     USING IT_BDCDATA

     MODE 'A'

     UPDATE 'S'.

Read only

0 Likes
2,050

I have done that but still d same error

Read only

0 Likes
2,050

Come on Man!!!

You have table with header line. Use IT_BDCDATA[] for using table.

Read only

0 Likes
2,050

First read once source code of bdcrecx1, the include define a table BDCDATA (and not IT_BDCDATA of your program) with header line (very old include) so use this internal table in the CALL TRANSACTIO  statement. Also try to debug your program to understand its behavior.

NB: There is also at least one alternative to BDC, look for class VMD_EI_API method MAINTAIN_BAPI in scn search tool.

Regards,

Raymond

Read only

sandroramos
Active Participant
0 Likes
2,050

Try passing IT_BDCDATA in CALL TRANSACTION.

CALL TRANSACTION 'XK01'

     USING IT_BDCDATA MODE 'A' UPDATE 'S'.


At,

Sandro Ramos

Read only

0 Likes
2,050


I have done that but still d same error

Read only

sandroramos
Active Participant
0 Likes
2,050

Comment lines:

*INCLUDE bdcrecx1.

*  PERFORM open_group.

*    PERFORM close_group.


Create subtorines: BDC_DYNPRO and BDC_FIELD in your program:


FORM bdc_dynpro USING program dynpro.

   CLEAR it_bdcdata.

   it_bdcdata-program  = program.

   it_bdcdata-dynpro   = dynpro.

   it_bdcdata-dynbegin = 'X'.

   APPEND it_bdcdata.

ENDFORM.                    "BDC_DYNPRO



FORM bdc_field USING fnam fval.

   CLEAR it_bdcdata.

   it_bdcdata-fnam = fnam.

   it_bdcdata-fval = fval.

   APPEND it_bdcdata.

ENDFORM.                    "BDC_FIELD



And try again.


I created a program to test and worked.


At,

Sandro Ramos

Read only

0 Likes
2,050


hi sandro,

                   i have done what u said but it showing me error as it_bdcdata doesn't component called program,can you please correct in me this.

Thanks.

Read only

0 Likes
2,050

change the declaration of it_bdcdata to:

DATA:  it_bdcdata TYPE TABLE OF bdcdata WITH HEADER LINE.

Read only

Former Member
0 Likes
2,051

Hello.

when you are using a batch input, dont need to write BDC_CURSOS...

perform bdc_field       using 'BDC_CURSOR'

                              'RF02K-KTOKK'.


Also, your BDC is not correct. Check the estructure, look this:


  PERFORM insert_line USING:

     'X'   'SAPMF02K'    '0100',

     ' '   'RF02K-BUKRS'   t_input-bukrs,

     ' '   'RF02K-KTOKK'   t_input-ktokk,

     ' '   'RF02K-EKORG'   t_input-ekorg,

     ' '   'BDC_OKCODE'    '/00'.

FORM INSERT_LINE USING

               X_L_START TYPE C X_L_NAME TYPE C X_L_VALUE TYPE ANY.

  DATA: H_BDC_AUX LIKE BDCDATA.

  ASSIGN H_BDC TO <TABLES_BDC>.

  MOVE X_L_START TO H_BDC_AUX-DYNBEGIN.

  IF X_L_START = 'X'.

    MOVE:

      X_L_NAME  TO H_BDC_AUX-PROGRAM,

      X_L_VALUE TO H_BDC_AUX-DYNPRO.

  ELSE.

    MOVE:

      X_L_NAME  TO H_BDC_AUX-FNAM,

      X_L_VALUE TO H_BDC_AUX-FVAL.

  ENDIF.

  APPEND H_BDC_AUX TO <TABLES_BDC>-TABLES.

ENDFORM.

FIELD-SYMBOLS: <TABLES_BDC> TYPE TYPE_BDC.

    CALL TRANSACTION 'XK01' USING <TABLES_BDC>-TABLES

                             MODE PC_MODE

                             UPDATE 'S'

                             MESSAGES INTO MESSTAB.

Regards

Miguel

Read only

venkateswaran_k
Active Contributor
0 Likes
2,050

Hi

Please review/change your data defenition on bdc_tab.

you may refer to the following:

Primarily,

DATA  :   begin of bdc_tab occurs 0.

                      include structure bdcdata.

DATA  :   end of bdc_tab.

Secondly,

  call transaction 'XK01' using bdc_tab mode 'S' update 'S'

Regards,

Venkat