cancel
Showing results for 
Search instead for 
Did you mean: 

serial/equipment number associated with a billing doc number

former_member212786
Participant
0 Kudos

Hi All,

I want to get all the serial/equipment number associated with a billing doc number.

Could you please help me?

rgds,

Rathinakumar

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi If you can pass Billing number into VBRP fetch reference Delivery number.....Pass Delivery number into LIEF_NR field of SER01 table fetch OKBNR....... PASS OKBNR into OBJK table fetch EQUNR(equipment number). you can this logic to get equipment number specific to billing number.

Hope this helps...

Regards,

Surendra

former_member212786
Participant
0 Kudos

Hi Surendra,

below is my code. here, i am getting only one equipment number. But in table objk, it has 2 records. is my code correct?

select single vbelv  posnv  from vbfa into (lv_vbelv, lv_posnv )

              where vbtyp_v = 'J'

              and vbeln = i_bill_itm-vbeln

              AND  posnn = i_bill_itm-posnr.

      if sy-subrc = 0.

       SELECT SINGLE obknr FROM ser01 into l_obknr

         WHERE lief_nr = lv_vbelv

         And posnr = lv_posnv.

    

         if sy-subrc = 0.

        SELECT SINGLE equnr FROM objk into i_bill_itm-zzequnr

           WHERE obknr = l_obknr.

      ENDIF.

endif.


rgds,

Rathinakumar

0 Kudos

Hi Rathinakumar,

                        

                        In debugging please check whether internal table is having two record not in the program.

Regards,

Surendra.