Application Development 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: 

BDC is not working in no screen mode

Former Member
0 Kudos

Hi Experts,

In my BDC program i am using 'XD01' transaction code.It is working fine, when i am using the CALL TRANSCATION MODE IN 'A' i..e in display all screens, and inserting the new records(with 4 fields) which i am passing from text file to the KNA1 table, But the records are not inserting when i change the mode as 'N'.

Before posting this question i have gone thru the existing threads which is related to the same question, but so most of them advised there ,to use the addition UPDATE 'S' also , i tried in that way also its not working.

in my program i Tried in both the ways: i.e with UPDATE and another one is with out UPDATE addiation.

1)CALL TRANSACTION 'XD01' USING IT_BDCDATA

MODE 'N' UPDATE 'S'

MESSAGES INTO ITAB_MESSAGES.

2)CALL TRANSACTION 'XD01' USING IT_BDCDATA

MODE 'N'

MESSAGES INTO ITAB_MESSAGES.

can any one help me out to resolve this issue,?

Thanks & Regards,

Sridhar Allenki

10 REPLIES 10

nabheetscn
Active Contributor
0 Kudos

Are you getting any error message?

Nabheet

Ryan-Crosby
Active Contributor
0 Kudos

Hi Sridhar,

I would recommend trying to run the BDC transactions in a session (setup using FM 'BDC_OPEN_GROUP' & closed with FM 'BDC_CLOSE_GROUP') and then checking for error results in transaction SM35. The logs in there should help you identify what the problem is with the BDC transaction so it can be corrected.

Regards,

Ryan Crosby

0 Kudos

Hi Ryan,

Thanks for your reply, But i am still working on CALL TRANSACATION method , But whatever your telling in SESSION mehtod,so i just want to make it work in CALL TRANSACTION mehtod only, using display no screens mode (N).As per my knowledge the purpose of the mode 'N' is with out displaying no screen is our transcion will get update in the database table, but its not happening here , so thats the thing i am working on,So can you reply me for this.

Thanks & Regards,

Sridhar Allenki

mithun_shetty4
Contributor
0 Kudos

Run it with the mode 'E' to check where the program stops

0 Kudos

Hi Mithun,

yes, if i put in E i am able to see the some error screens, but these are not mandatory for me i mean i am not sending any values thru these screen, and in these screens fields mandatory fields are not there,

So i am skipping these screens while recording, but when i put display all screens mode , after 2 screens i.e which i am giving inputt values and for the remaining screens where mandatory fields are not needed i am skipping those pressing enter while recording ,(those remaining screens i am getting in 'E' mode and when i am pressing enter and skipping those screens are updating the table).

But why these screens i am getting , i am not understanding becz where mandatory fields are not there, and in 'N' mode also should update my database table.

Thanks,

Sridhar Allenki

Former Member
0 Kudos

Hi

You can record setting the value Not Batch Input Value and Simulate Background. If you have recorded without setting these conditions, then the system will call the different.

It will not show you error message but status

Regards

Shiva

0 Kudos

Hey shiva,

Thanks for your reply,But i did not get what exactly you are saying As i am new to ABAP , just started working on BDC, So can you clearly explain .

Thanks & Regards,

Sridhar Allenki

0 Kudos

Hi Sridhar,

I just finished a BDC with exactly same as your requirement, uploading from a txt file and updating.

its working very fine for me and i have done this many times.

I think if some of the records are not updating it is due to the error messages only.

Check your error msg table. in ITAB_MESSAGES.

you can also check the exact error msg using below code..

IF MESSTAB-MSGTYP EQ 'E'.     
      CLEAR WF_MESSAGE.
      SELECT SINGLE TEXT   INTO   WF_MESSAGE
      FROM   T100      WHERE  SPRSL EQ 'E'
      AND    ARBGB EQ MESSTAB-MSGID
      AND    MSGNR EQ MESSTAB-MSGNR.

or You use system variable itself to show it.

CALL TRANSACTION 'XD01' USING IT_BDCDATA
MODE 'N' UPDATE 'S'
MESSAGES INTO ITAB_MESSAGES.
if sy-subrc ne 0.
IF sy-msgty EQ 'E' .
CLEAR wf_error_text.
SELECT SINGLE text INTO wf_error_text
     FROM  t100
     WHERE      sprsl  =  'E'
     AND        arbgb  =  sy-msgid
     AND        msgnr  =  sy-msgno.
  REPLACE FIRST OCCURRENCE OF '&' IN wf_error_text WITH sy-msgv1 .
  REPLACE FIRST OCCURRENCE OF '&' IN wf_error_text WITH sy-msgv2 .
  REPLACE FIRST OCCURRENCE OF '&' IN wf_error_text WITH sy-msgv3 .
  REPLACE FIRST OCCURRENCE OF '&' IN wf_error_text WITH sy-msgv4 .
  WRITE : / 'Error Messge:' , wf_error_text
endif
endif.

let me knw if any other problem..

0 Kudos

Hi dude,

Now i am able to insert the records in database table 'KNA1' with display no screens mode, But problem is in my program only, i commented some perform statements,

[ which is not relevant to my input fields , i.e i am inputting fields for 2 screens only but when i am recording after these 2 screens 4 more screens are there , but i am not inputting any fields because its non mandatory fields, so what i thought , i can comment these performs which are not relevant to my transaction , so in result its not inserting the records in my table, so when i am uncommenting these performs also in my program its working fine in display no screens mode also]

So my problem is solved , but still i have doubt why these screens are needed which i am not inputting the fields in the remainins screens.

Thanks & Regards,

Sridhar Allenki

0 Kudos

Hi,

In some situations we need to enter the inputs manually for some fields . In this situation these screens are used.