Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DYNP_VALUES_READ to get data froma a TABSTRIP control.

Former Member
0 Likes
671

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

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

3 REPLIES 3
Read only

LucianoBentiveg
Active Contributor
0 Likes
601

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.

Read only

Former Member
0 Likes
601

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

Read only

dairolozano
Contributor
0 Likes
601

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.