cancel
Showing results for 
Search instead for 
Did you mean: 

Help regarding passing range values from component to another component.

Former Member
0 Kudos

Hello Experts,

   

                   i need urgent please help me out,

 

i have two components comp1 and comp2 .

and in 1st component i declared a node customer of 1.1 (madeit as interface node) and with atttribute kunnr .

and i set kunnr as select options in the view of component1 .

and in component 2 i need to display the invoice details of that range kunnr what we had given in view of component 1 .

like i will write in method doinit of that second component like : select vbeln fkart kunag from vbrk into table lt_vbrk where kunag in ? .

previously i had  only one kunnr in view of component1 and i wrote previously like select vbeln fkart kunag from vbrk into table lt_vbrk where kunag = lt_kunnr .

please help me out . eagerly waiting for your valuable responses.

Accepted Solutions (0)

Answers (2)

Answers (2)

amy_king
Active Contributor
0 Kudos

Hi Praveen,

Take a look at Range Context Nodes to see if it would help in your scenario. Since a range node must be created dynamically, I'm not certain how it will behave with an interface node. If a range node doesn't meet your needs, just change your 1..1 node to have cardinality 1..n so that more than one customer can be stored in the interface node.

Cheers,

Amy

Former Member
0 Kudos

you can achieve this functionality by many ways.

best way is to pass value using plug and  in inbound plug of componnet2's view you can write your select statement.

other ways.

1. use interface node and get  value of kunnr and put select statement in wddoinit method of componnet2's view.

2. use assistance class to store value of kunnr in static attribute and use same assistance class to read kunnr value and place your code in wddoinit.

reward if helpful

Former Member
0 Kudos

other ways.

1. use interface node and get  value of kunnr and put select statement in wddoinit method of componnet2's view.

I UNDERSTOOD ABOVE STEP WHAT U TOLD SIR,

BUT HOW TO READ KUNNR , SINCE IT IS NOT INPUT FIELD  TO READ , IT IS IN SELECT OPTIONS.

PLEASE FILL THIS IN COMP2'S DOINT METHOS ,

SELECT * FROM INTO TABLE LT_VBRK WHERE KUNAG IN ?

WHAT COMES IN ? PLACE


amy_king
Active Contributor
0 Kudos

Hi Praveen,

Take a look at the documentation for range tables. You'll need to define a range table to use with your select statement, for example.

DATA: lr_kunag TYPE RANGE OF vbrk-kunag.

* Populate the range table

...

SELECT *

               FROM vbrk

               INTO TABLE lt_vbrk

               WHERE kunag IN lr_kunag.

Cheers,

Amy

Former Member
0 Kudos

DATA: LR_KUNNR TYPE RANGE OF KNA1-KUNNR,

      LR_KUNNR_LINE LIKE LINE OF LR_KUNNR .

LR_KUNNR_LINE-sign   = 'I'.

LR_KUNNR_LINE-option = 'BT'.

LR_KUNNR_LINE-low    = '?'.

LR_KUNNR_LINE-high   = '?'.

APPEND LR_KUNNR_LINE TO LR_KUNNR.

IN THE ABOVE QUESTION MARK PLACES WE NEED TO PASS  WHAT ?

amy_king
Active Contributor
0 Kudos

Hi Praveen,

These are the LOW and HIGH values of customer number. Please take a look at the documentation which explains the SIGN, OPTION, LOW and HIGH fields.

Cheers,

Amy