2008 Feb 15 3:54 AM
hi all,
i have to edit a requirement routine in which i am supposed to retrieve data frem the database table VBAP. This routine runs dynamically when a transaction is executed.
My question is, can we hit a database table inside a requirement routine?
please provide me valid reasons if the answer is no, and if the answer is yes, please give me some examples.
Thank you
2008 Feb 15 3:59 AM
routine is just a piece of code that will be hit... so it can contain any code.. even the code to hit the database table as well..
in the routine source code just put some select statement... according to ur requirement..
select vbeln parvw from vbap
into {lv_vbeln lv_parvw)
where <condition>award points if helpful
hi all,
i have to edit a requirement routine in which i am supposed to retrieve data frem the database table VBAP. This routine runs dynamically when a transaction is executed.
My question is, can we hit a database table inside a requirement routine?
please provide me valid reasons if the answer is no, and if the answer is yes, please give me some examples.
Thank you
2008 Feb 15 3:59 AM
routine is just a piece of code that will be hit... so it can contain any code.. even the code to hit the database table as well..
in the routine source code just put some select statement... according to ur requirement..
select vbeln parvw from vbap
into {lv_vbeln lv_parvw)
where <condition>award points if helpful
2008 Feb 15 4:07 AM
hi jay,
This requirement routine is RV61B620 which is setup in the access sequence of an output type.
only structures are used in the code presently. can u give an example of such code where a database table has been used.
Thanks
2008 Feb 15 4:13 AM
check if this might help u
IF you have 3 different access sequences for one condition record then in a pricing procedure in what hierarchy will you maintain the three accesses?
In Condition Records (T Code VK11), you would be putting values to corresponding Condition Types. Now one Condition Type can be assigned to one access sequence. In Access Sequence, you can assign whichever tables and fields are required.
So in my opinion, you cannot have one condition record for 3 access sequences.
What happens in the access sequence when you put all the ticks in the exclusive field?
When you put tick in exclusive field of all access sequences, in my opinion, it will try to get available data from the first. Only in case, data is not available, will it move on to the next one.
2008 Feb 15 4:28 AM
so, u mean to say that we can use a database table ?
i am new to all these terms like condition table and access sequences,
i would be very greatful if u cud explain it in a more elaborate way.
thanks
2008 Feb 15 4:35 AM
Q: I have a requirement to write a routine. I have to store Material and Sub Material values to an internal table ITAB from /BIO/PMATERIAL table with comparing to
Data package-material but I need to write only materials which are not equal to sub material because Most of the cases material and sub materials are same.
Material is a primary key in the table and sub material is an attribute of Material and condtion is Material NE Sub Material.
How do I write a routine?
TYPE : BEGIN OF TY_MATERIAL,
MATERIAL LIKE /BI0/PMATERIAL-MATERIAL,
SUB_MATERIAL LIKE /BI0/PMATERIAL-SUB_MATERIAL,
END OF TY_MATERIAL.
DATA : WA_MATERIAL TYPE TY_MATERIAL,
ITAB_MATERIAL TYPE TY_MATERIAL OCCURS 0.
SELECT <material sub_material>
from /BI0/PMATERIAL
INTO TABLE ITAB_MATERIAL
FOR ALL ENTRIES OF DATA_PACKAGE
WHERE MATERIAL EQ DATA_PACKAGE-MATERIAL.
LOOP AT ITAB_MATERIAL INTO WA_MATERIAL.
IF WA_MATERIAL = WA_SUB_MATERIAL.
DELETE ITAB_MATERIAL.
ENDIF.
CLEAR WA_MATERIAL.
ENDLOOP.
check this links:
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |