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

Facing problem in VL32N

Former Member
0 Likes
2,464

Hi ,

While I am running BDC to delete Inbound Delivery through this VL32N ,after completion it is saying "Record has been saved".It is not Deleting.

But when I tried to delete form T.Code it is saying " Record cannot be deleted " because for this GR Number exists.

Now my question is why BDC is not showing this message that " Record cannot be deleted ".

Please help me to solve this.

Regards

Shek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,121

Are you passing the parameter  "options"  ALONG WITH  call transaction

with the parameter racommit = 'X'...

17 REPLIES 17
Read only

Former Member
0 Likes
2,122

Are you passing the parameter  "options"  ALONG WITH  call transaction

with the parameter racommit = 'X'...

Read only

0 Likes
2,121

Hi ,

  

   This is the code .Anything else I have to write.

     CALL TRANSACTION 'VL32N' USING IT_BDC
                UPDATE 'S'
                MODE 'A'.

Read only

0 Likes
2,121

Hi ,

  

   This is the code .Anything else I have to write.

     CALL TRANSACTION 'VL32N' USING IT_BDC
                UPDATE 'S'
                MODE 'A'.

Read only

0 Likes
2,121

Hi ,

  

   This is the code .Anything else I have to write.

     CALL TRANSACTION 'VL32N' USING IT_BDC
                UPDATE 'S'
                MODE 'A'.

Read only

0 Likes
2,121

Hi All, 

Excuse me my net is slow . I pressed comment many times .So this is posted many times.

Read only

0 Likes
2,121

Use Mode 'N' an you'll get the correct(last) message out of the BDC-Call.

KR Alfons

Read only

0 Likes
2,121

delete the excess posts.

Read only

0 Likes
2,121

Hi ,

  I used mode 'N'  also but no result.

Regards

Read only

0 Likes
2,121

Use the addition messages into messtab. After the call loop at table messtab where message type = 'E'. This message should be your error-message.

KR

Alfons

Read only

0 Likes
2,121

Hi ,

What you said right . I am getting pop-up & it is displaying the message " Record can't delete" but in message table i am getting Successful Status. Why ?? . Any idea.

Regards

Shek

Read only

0 Likes
2,121

I think this behavior results from mode 'A'. The BDC must run into error and stop immediately (Mode N), no further user-interaction. You should get a subrc 1001 after the call transaction and the error message in table messtab.

KR Alfons

Read only

0 Likes
2,121

Hi ,

I kept mode 'N'  .

Tell me whether it is right or wrong.

CALL TRANSACTION 'VL32N' USING IT_BDC
                OPTIONS FROM WA_OPT
                MESSAGES INTO IT_MSG.

regards

Shek

Read only

0 Likes
2,121

Hi ,

I am getting sy-subrc =  1001 but no error meaage.

Regards

Shek

Read only

0 Likes
2,121

You should find the error message in the table messtab. If you want to issue the message, you have to do it on your own.

something like:

if sy-subrc <> 0.

loop at messtab into messtab_line where type = 'E'.

  message ... with messtab-line-msgv1....

exit. "maybe

endloop.

endif.

KR Alfons

Read only

0 Likes
2,121

Hi ,

  You are right but in messtab table i am getting type =  'S'.I don't why . This is the problem.

Regards

Shek

Read only

Former Member
0 Likes
2,121

Typically it is not appropriate to attempt "Enjoy" transactions (zzzzN) via BDC and call transaction.   I don't have this module, so I cannot say for sure, but I would first look for a BAPI that would do this....And, apparently, SAP is trying hard to tell you that you cannot delete when there is a posted Goods Receipt!   Now, to me, that seems quite logical, but I don't know your requirements.

Discuss with your functional specialist or super user to be sure you know what steps would have to be done to successfully achieve the requirements, and write your code to do that, including any reversal of GR, etc.  You will need to write code to do what you need, based upon what you find for a specific document.    Be sure that you should be doing a deletion;  there may be a flag to denote "deleted" in the data row, sometimes named like ELIKZ, if I remember correctly from my logistics module days.   So, a little basis DB table understanding:  deleted does not mean physically removed from the database...that would leave widows and orphans in other tables.  Deleted means "marked as deleted"  and physical removal occurs in reorg of the db table by DB Admin or Basis team periodically.

Since VL32N undoubtedly works, suspect your code and the way you're applying it to the situation you have.

Read only

0 Likes
2,121

Hi Break-Point,

I got the solution . What you said exactly right that for Enjoy T.Code we should not use BDC ,but the BAPI which I found is not working so i choosen BDC .

        WA_OPT-RACOMMIT = 'X'.
         WA_OPT-NOBINPT = 'X'.
         WA_OPT-DISMODE = 'A'.
         WA_OPT-UPDMODE = 'S'.

CALL TRANSACTION 'VL32N' USING IT_BDC
                OPTIONS FROM WA_OPT.

Regards

Shek