cancel
Showing results for 
Search instead for 
Did you mean: 

Script

Former Member
0 Kudos

I want to print the value of the field ARBEI - table AFVV in the main window based on the order no i enter ( Field - AUFNR )

I have created a program given below to print fields arbid , vornr in the main window and it works fine...

but i dono how to print the field arbei since its from different table and aufnr field is not in the table afvv.

can any one help with the program statements ?

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-090.

PARAMETERS P_AUFNR LIKE AFIH-AUFNR OBLIGATORY .

SELECTION-SCREEN END OF BLOCK b1.

START-OF-SELECTION.

perform f100_main.

perform display_form.

form f100_main.

select afruaufnr afruarbid afru~vornr into corresponding fields of table itab from afko

inner join afru

on afkoaufnr = afruaufnr

where afko~aufnr = p_aufnr.

loop at itab.

select single arbpl into itab-arbpl

from crhd where OBJID = Itab-arbid.

modify itab.

endloop.

endform.

Accepted Solutions (0)

Answers (1)

Answers (1)

birendra_chatterjee
Active Participant
0 Kudos

Hi,

You can get AUFPT (Routing number of operations in the order) and APLZT (General counter for order) from AFKO based on AUFNR (Order Number).

Now fetch ARBEI (Work involved in the activity) from AFVV where AFVV-AUFPL equals AFKO- AUFPT and AFVV-APLZL equals AFKO- APLZT.

Regards,

Birendra

Former Member
0 Kudos

hi ,

I have written the coding like below ..but it doesnt work..

can u help

select aufpt aplzt into corresponding fields of itab from afko where afko~aufnr = p_aufnr.

loop at itab.

select single arbei into itab-arbei from afvv where afvvaufpl = itab-aufpt and afvvaplzl = itab-aplzt.

endloop.

endselect.

endform.