2007 Sep 12 8:17 AM
Hi experts
I need a program to extract data from PA0002-INITS. it needs first get data from KNVP-PARVW, then to check table PA0002 to get INITS.
can anybody help me?
promise to reward points if helps.
thanks
elly
Hi experts
I need a program to extract data from PA0002-INITS. it needs first get data from KNVP-PARVW, then to check table PA0002 to get INITS.
can anybody help me?
promise to reward points if helps.
thanks
elly
2007 Sep 12 9:03 AM
Hmmmmm, don't unsderstand exactly the problem..........
Key for PA0002 is PERNR, so select your record from KNVP based on knvp-keys:
- KUNNR
- VKORG
- VTWEG
- SPART
- PARVW
This will give a you a KNVP-PERNR, with which you can address the PA0002 table and give you the right record.
I would do it like this:
DATA: lf_pernr TYPE pernr_d,
lf_inits TYPE inits.
SELECT SINGLE pernr
INTO lf_pernr
FROM knvp
WHERE kunnr = 'your CUSTNO'
AND vkorg = 'your sales org'
AND vtweg = 'your distr.chann'
AND spart = 'your div'
AND parvw = 'your partn. func'.
IF sy-subrc = 0.
SELECT SINGLE inits
INTO lf_inits
FROM pa0002
WHERE pernr = lf_pernr.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |