on 02-16-2014 12:51 PM
Hi friends, I have got 2 tables.
In 1st table MATNR exists as PMATNR and SMATNR.
In 2nd table only MATNR exists (logically it has the values of both PMATNR & SMATNR).
Common field is Location(LocNo).
Now I need to retrieve fields AT101 and AT104 from 2nd table based on Location and MATNR.
Each record in 1st table will have 2 records in 2nd table (as MATNRs are classified into 2 types)..
How do I pass values of both PMATNR and SMATNR from 1st table to a single MATNR field(in 2nd table) along with Location and retrieve AT101 and AT104 from 2nd table??
Pls help me out...
Hi Aravindh,
Can you share how MATNR exist as PMATNR and SMATNR in the table with example and also which are standard tables you referencing ?
Thanks & Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As I understood in table 1 no field called MATNR instead you have PMATNR and SMATNR and in second table field called MATNR.
1. Are you looking to pass both PMATNR and SMATNR of table 1 to tabl2 ? If yes then you need to prepare range of MATNR .
Like
R_MATNR-SIGN = 'I'.
R_MATNR-OPTION = 'EQ'.
R_MATNR-LOW = PMATNR.
APPEND R_MATNR.
R_MATNR-LOW = SMATNR.
APPEND R_MATNR.
Pass R_MATNR to second table2.
This is rough code need to correct accordling. Ranges are used to prepare select option internally . Usage same as select option.
Read more about ranges.Note what i have given in obsolete way of range . Instead you declare range as
DATA: r_matnr type range of /SAPAPO/MATNR.
2. Else case you decide which field (PMATNR or SMATNR )value need to pass table 2 . For that you need to check with functional guy.
Thanks & Regards,
Arun
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.