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

issue with call transcation

Former Member
0 Likes
1,010

Hi,

call transaction 'ZTEST' using i_bdcdata

mode 'N'

messages into i_bdcmsgcoll.

This is the message displayed when the record is saved and evrything is right in my module pool

MESSAGE s004(zz) with 'Data is saved'.

This is what i'm having in my i_bdcmsgcoll for a correct record from above statment.

TCODE C 20 ZTEST

DYNAME C 40 SAPMZTEST

DYNUMB C 4 9003

MSGTYP C 1 S

MSGSPRA C 1 E

MSGID C 20 DH

MSGNR C 3 801

MSGV1 C 100

MSGV2 C 100

MSGV3 C 100

MSGV4 C 100

ENV C 4 CTU

FLDNAME C 132

Looking at this i cannot say the record has been uploaded succesfully

This is the message displayed when the record is saved and evrything is right in my module pool

Message i004(zz) with MATNR 'REASON : Data canot be saved'.

This is what i'm having in my i_bdcmsgcoll for a correct record from above statment.

TCODE C 20 ZTEST

DYNAME C 40 SAPMZTEST

DYNUMB C 4 9003

MSGTYP C 1 I

MSGSPRA C 1 E

MSGID C 20 ZZ

MSGNR C 3 004

MSGNR C 3 004

MSGV1 C 100 0005230931

MSGV2 C 100 rEASON :

MSGV3 C 100 Data canot be saved

MSGV4 C 100

ENV C 4 CTU

FLDNAME C 132

This looks right.and looking at that i can say that the record was rejected.

QUESTION

WHAT IS THE REASON FOR NOT GETTING DATA IN TO I_BDCMSGCOLL WHEN THE MESS TYPE IS S.

Thanks

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
982

You should be getting the success messages as well. Make sure that you check all records passed back thru the message tab.

Regards,

Rich Heilman

Hi,

call transaction 'ZTEST' using i_bdcdata

mode 'N'

messages into i_bdcmsgcoll.

This is the message displayed when the record is saved and evrything is right in my module pool

MESSAGE s004(zz) with 'Data is saved'.

This is what i'm having in my i_bdcmsgcoll for a correct record from above statment.

TCODE C 20 ZTEST

DYNAME C 40 SAPMZTEST

DYNUMB C 4 9003

MSGTYP C 1 S

MSGSPRA C 1 E

MSGID C 20 DH

MSGNR C 3 801

MSGV1 C 100

MSGV2 C 100

MSGV3 C 100

MSGV4 C 100

ENV C 4 CTU

FLDNAME C 132

Looking at this i cannot say the record has been uploaded succesfully

This is the message displayed when the record is saved and evrything is right in my module pool

Message i004(zz) with MATNR 'REASON : Data canot be saved'.

This is what i'm having in my i_bdcmsgcoll for a correct record from above statment.

TCODE C 20 ZTEST

DYNAME C 40 SAPMZTEST

DYNUMB C 4 9003

MSGTYP C 1 I

MSGSPRA C 1 E

MSGID C 20 ZZ

MSGNR C 3 004

MSGNR C 3 004

MSGV1 C 100 0005230931

MSGV2 C 100 rEASON :

MSGV3 C 100 Data canot be saved

MSGV4 C 100

ENV C 4 CTU

FLDNAME C 132

This looks right.and looking at that i can say that the record was rejected.

QUESTION

WHAT IS THE REASON FOR NOT GETTING DATA IN TO I_BDCMSGCOLL WHEN THE MESS TYPE IS S.

Thanks

7 REPLIES 7
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
983

You should be getting the success messages as well. Make sure that you check all records passed back thru the message tab.

Regards,

Rich Heilman

Read only

0 Likes
982

Hi Rich,

I have only one record because i tried one correct record and next time with one wrong record.

I have only one record in i_bdcmsgcoll and i have posted the contents as well in my previous post.

Thanks

let me know

Read only

0 Likes
982

The message DH 801 says "No values found". Are you sure that you are not raising this message somewhere in your code. Did you try running your program with MODE = 'A'.

Regards,

Rich Heilman

Read only

0 Likes
982

Hi,

I executed the program in mode A.AND I HAD BREAK POINT IMMEDIATELY AFTER CALL TRANSACTION STATMENT.

mode A took me to all the steps in module pool screen and atlast i had ok_code save and it return to my upload program.it didnot displayed any message saying data saved in mode A.

CAN I JUST DECIDE AND PASS A MESS SAYING RECORD UPLOADED BASED ON SY-SUBRC BECAUSE FOR INCORRECT RECORD THE SY-SUBRC IS 1001 AFTER CALL TRANSACTION STATEMENT AND O FOR CORRECT STATMENT.

THANKS

Read only

0 Likes
982

<i>CAN I JUST DECIDE AND PASS A MESS SAYING RECORD UPLOADED BASED ON SY-SUBRC BECAUSE FOR INCORRECT RECORD THE SY-SUBRC IS 1001 AFTER CALL TRANSACTION STATEMENT AND O FOR CORRECT STATMENT.</i>

Yes, you can do that based on SY-SUBRC, but again I would have assumed that your success message would be coming as it does in other transactions done by BDC.

Regards,

Rich Heilman

Read only

0 Likes
982

Hi

Thanks all

I awarded points to all

Read only

Former Member
0 Likes
982

Hi,

You can do like this.

Check the sy-subrc after the call transaction and manually build the bdcmsgcoll with the desired fields, whenever there is a success.

This way BDCMSGCOLL will have all the messages error or success or warning etc...

Regards

Subramanian