on 12-09-2011 5:49 AM
Dear All,
I need BELNR FROM BKPF Based on RSEG-belnr.
DATA: V_BELNR LIKE BKPF-BELNR,
V_RESWK LIKE EKKO-RESWK.
DATA:B1 LIKE RSEG-BELNR,
B2 LIKE RSEG-GJAHR.
DATA:V_AWKEY LIKE BKPF-AWKEY.
DATA:V_DMBTR LIKE BSEG-DMBTR.
B1 = WA_RSEG-BELNR.
B2 = WA_RSEG-GJAHR.
CONCATENATE B1 B2 INTO V_AWKEY.
IF WA_RSEG-BELNR IS INITIAL.
CLEAR : WA_FINAL-BELNR1,WA_FINAL-BUDAT1.
ENDIF.
SELECT SINGLE BELNR INTO V_BELNR
FROM BKPF
WHERE AWKEY = V_AWKEY
AND GJAHR = WA_RSEG-GJAHR
AND BUKRS = WA_RSEG-BUKRS
and awtyp = 'RMRP'.
IF SY-SUBRC = 0.
WA_FINAL-BELNR1 = V_BELNR.
ENDIF.
My select is working fine but my problem is BKPF-BELNR getting but where Rseg-belnr is blank then it should not get bkpf-belnr.
i don't want print BKPF-BELNR WHERE RSEG-BELNR is Blank.
Please help on this.
Regards,
Parshuram
My Self solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.