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

VBSEC Table not updating while parking a doc

Former Member
0 Likes
1,126

Hi all,

I am working on a program wherein I am using a FM which is a copy of the std FM PRELIMINARY_POSTING_FB01. When I am calling the FM ZPRELIMINARY_POSTING_FB01 I am passing the following tables to it t_bkpf, t_bseg,t_bsec,t_bset and t_bsez. Tables t_bkpf, T_bseg and t_bsec have values in it. Now when I called this FM in my program it parked the document correclty but it only updated tables VBKPF and VBSEG but didn't update the table VBSEC which has one time vendor information. I put a break point just right before I am calling the FM and all the three tables are filled with the correct data but when I checked table vbsec after parking it doesn't have any data. When I did the same using std TCode FV60 it updated table VBSEC as well.

This is how I have called the FM in my program:

CALL FUNCTION 'ZPRELIMINARY_POSTING_FB01'
    EXPORTING
       i_xcmpl =                         lv_i_xcmpl
       i_tcode =                         lv_i_tcode
       i_tcode_int =                     lv_i_tcode_int
    TABLES
       t_bkpf =                          lt_c_t_bkpf
       t_bseg =                          lt_c_t_bseg
       t_bsec =                          lt_c_t_bsec
       t_bset =                          lt_c_t_bset
       t_bsez =                          lt_c_t_bsez
  .

Can you please tell me what might I be missing here?

Thnaks,

Rajat

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
943

>

> Can you please tell me what might I be missing here?

You are missing giving the forum any information to help with your question. The problem could be anywhere.

Rob

>

> Can you please tell me what might I be missing here?

You are missing giving the forum any information to help with your question. The problem could be anywhere.

Rob

4 REPLIES 4
Read only

Former Member
0 Likes
944

>

> Can you please tell me what might I be missing here?

You are missing giving the forum any information to help with your question. The problem could be anywhere.

Rob

Read only

0 Likes
943

Hey Rob,

Right before calling the FM I checked my internal table lt_c_t_bsec and it had data in it but when I checked the table VBSEC after parking the doc I didn;t see any entry in the table for that document number, so I am not able to understand why it didn;t update table VBSEC, although it updated table VBKPF and VBSEG correctly.

Read only

0 Likes
943

Hi

Maybe put a breakpoint in the following code:

Include LF040F00:


    loop at yvbsec.
      loop at yvbseg where buzei eq yvbsec-buzei.
        if yvbseg-xcpdd ne 'X' and
           yvbseg-xzemp ne 'X'.
          delete yvbsec.
          exit.                                      "Note 430791
        else.
          upd_vbsec = char_u.
        endif.
      endloop.
    endloop.

        loop at yvbsec where buzei eq xvbsec-buzei.
          i = sy-tabix.
          if yvbsec ne xvbsec.
            upd_vbsec = char_u.
            xvbsec-kz = char_u.        "Update
          endif.
        endloop.
        if sy-subrc ne 0.
          upd_vbsec = char_u.
          xvbsec-kz = char_i.          "Insert
        endif.

These appear to be the points where the update flag for table BSEC is set.

Kind regards,

Robert

Read only

0 Likes
943

Hi,

Thanks for the reply... I put my break points in there but it's not stopping there at all. I am still looking into and will keep updating.