cancel
Showing results for 
Search instead for 
Did you mean: 

VPKO_INIT_BY_VBELN behaves differently in different programs

Former Member
0 Kudos

Hi All

I am using


  CALL FUNCTION 'VPKO_INIT_BY_VBELN'
    EXPORTING
      i_vbeln       = l_vbeln
      i_vpkus       = '01'
      i_mode        = 'V'
    TABLES
      it_posnr      = lt_posnr
    EXCEPTIONS
      input_error   = 1
      init_error    = 2
      pricing_error = 3
      OTHERS        = 4.
  IF sy-subrc <> 0.
    RETURN.
  ENDIF.

  CALL FUNCTION 'VPKO_GET_SD_ALL_ITEMS'
    TABLES
      et_rsthie_sd       = lt_rsthie
      et_rsttxt_sd       = lt_rsttxt
      et_items_sd        = lt_items
    EXCEPTIONS
      input_error        = 1
      po_not_initialized = 2
      OTHERS             = 3.
  IF sy-subrc <> 0.
    RETURN.
  ENDIF.

in 2 programs. All the parameters are of the same data type and called the same way. There are no set paramters before the CALL FUNCTION 'VPKO_INIT_BY_VBELN' statement

For the same data, one of the programs returns more number of lines on the lt_rsthie table.

When I debug Function module 'VPKO_INIT_BY_VBELN', it inturn calls 'VPKDPP_GET_DI_WITH_VALUES' and returns internal table PRICEOBJ-DI_HIER which has different number of rows when called from different programs.

Any ideas is very much appreciated

Thanks in advance

Sriram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks Gokul

This FM gets used by DP91 transaction (if that rings a bell {Project Systems}) There are user exits that called when the init FM gets executed, there is some code which gets executed specific to the other program and not my program. If that makes sense

Former Member
0 Kudos

Check the piece of code you have posted and by the way DP 91 transaction is not solely owned by Project System (go through the RRB process once and that should ring a bell for you too).

Anyway good to see that you got your issue solved and i am pretty sure that it had nothing to do with Project System.

Answers (1)

Answers (1)

Former Member
0 Kudos

I guess you will have to post your query in the right forum to get an apt response.