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

serial numbers

Former Member
0 Likes
1,395

dear sir,

can u plz tell me how i can fetch my serial numbers of my product in my daily production report. (alv report). through that i can recognise which products belongs to which serial number.through functionality i can check my serial numbers.but i want to show those serial numbers in my alv report.

through this subquery i can fecth my only first one serial no with respect to my material document no..and leaving the reamaning ones. how i can fetch the remaning ones. my query is:

select sernr from objk into it_so-sernr where obknr in ( select obknr from ser03 where mblnr = it_so-mblnr ) .

dear sir,

can u plz tell me how i can fetch my serial numbers of my product in my daily production report. (alv report). through that i can recognise which products belongs to which serial number.through functionality i can check my serial numbers.but i want to show those serial numbers in my alv report.

through this subquery i can fecth my only first one serial no with respect to my material document no..and leaving the reamaning ones. how i can fetch the remaning ones. my query is:

select sernr from objk into it_so-sernr where obknr in ( select obknr from ser03 where mblnr = it_so-mblnr ) .

9 REPLIES 9
Read only

Former Member
0 Likes
1,176

Hi,

Try this function module : SERIAL_NUMBER_GET_MATERIALS

MB_SERIAL_COPY Copy serial numbers of material documents

MB_SERIAL_PREPARE Prepare serial numbers of material documents

Read only

0 Likes
1,176

where i will have to declare these function..actually there is already made report and on rthat report i have to add one more fireld whose name is sernr. i have used above qury but it fetches only first serial number.what i have to do so i can get rest ones's.

Read only

0 Likes
1,176

Hi,

select sernr from objk into it_so-sernr where obknr in ( select obknr from ser03 where mblnr = it_so-mblnr ) .

I think it is need to provide an internal table it that Bold location.

Read only

0 Likes
1,176

hi,

my query is running without any error but there is some problem that i have i said it earlier.

it fetches only first one serial no. leaving reamaning ones.

Read only

0 Likes
1,176

Hi,

What i am saying here is you are providing work area with field at that time it is always getting only one value for one time execution.

Better is create an internal table with SERNR field and assign there instead of work area.

like Select sernr from objk into table it_sernr xxxxxxxxxxxxxxxxxxxxxxx.

at that time only you will get all values at a time into internal table.

Read only

0 Likes
1,176

hello sir,

i dont know how we can deaclare that can u plz write that with synatx...

Read only

Former Member
0 Likes
1,176

Hi,

Please modify your query as :

select sernr from objk into table it_so-sernr

where obknr in

( select obknr from ser03 where mblnr = it_so-mblnr ) .

I think you are using IT_SO as Internal for Serial Numbers.

So include word 'TABLE' in your query as i hve written above.

Regds,

Anil

Read only

Former Member
0 Likes
1,176

Hi,

use this code.


      SELECT *
        FROM ser03
        INTO TABLE i_ser03
       WHERE mblnr in mblnr
         AND mjahr eq mjahr.
     LOOP AT i_ser03 INTO w_ser03.
        SELECT *
          FROM objk
          INTO TABLE i_objk
         WHERE obknr EQ w_ser03-obknr.
        SORT i_objk BY sernr.
        LOOP AT i_objk INTO w_objk.
          itab-matnr = w_objk-matnr.
          itab-serno = w_objk-sernr.
          itab-mblnr = w_ser03-mblnr.
          itab-mjahr = w_ser03-mjahr.
        append itab.
       ENDLOOP.
ENDLOOP.

Read only

Former Member
0 Likes
1,176

gud answers friendz.