05-19-2006 6:05 PM
Hi!
How can a I use DYNP_VALUES_READ to read a value from a tabstrip control, if the tab where the field is located isn't active. (IE, from a BADI or User Exit).
Thanks for your help.
Dairo
05-19-2006 7:19 PM
You can read internal tables from programs in stack from userexits and BADIs. Example (See only first 6 lines):
FORM KOBEV_905.
DATA: t_vbap TYPE VBAP OCCURS 0 WITH HEADER LINE.
DATA: campo1(17) VALUE '(SAPMV45A)XVBAP[]'.
FIELD-SYMBOLS: <xvbap>.
ASSIGN (campo1) TO <xvbap>.
t_vbap[] = <xvbap>.
CLEAR t_vbap.
READ TABLE T_VBAP WITH KEY CEPOK = 'B'.
IF SY-SUBRC EQ 0.
SY-SUBRC = 4.
ELSE.
IF KOMKBV1-UVALL = 'C'.
SY-SUBRC = 0.
ELSE.
SY-SUBRC = 4.
ENDIF.
ENDIF.
ENDFORM.
05-19-2006 8:30 PM
Thanks for your Help ..
I need to retrieve the value for fields COBL-KNLNR and COBL-KBLPOS in transaction ME52N, tab Account Asignment(Imputacion), from the CHECK Method of the BADI IF_EX_ME_PROCESS_REQ_CUST. How can I use your sample to do it?
Thanks fot your help.
Best Regards,
Dairo
06-24-2015 1:53 PM
You can read internal tables from programs in stack from userexits and BADIs. Example (See only first 6 lines):
FORM KOBEV_905.
DATA: t_vbap TYPE VBAP OCCURS 0 WITH HEADER LINE.
DATA: campo1(17) VALUE '(SAPMV45A)XVBAP[]'.
FIELD-SYMBOLS: <xvbap>.
ASSIGN (campo1) TO <xvbap>.
t_vbap[] = <xvbap>.
CLEAR t_vbap.
READ TABLE T_VBAP WITH KEY CEPOK = 'B'.
IF SY-SUBRC EQ 0.
SY-SUBRC = 4.
ELSE.
IF KOMKBV1-UVALL = 'C'.
SY-SUBRC = 0.
ELSE.
SY-SUBRC = 4.
ENDIF.
ENDIF.
ENDFORM.