Let me share to you tutorial how to create ranges table abap. Ranges table help us for select data from database more easy. The structure for ranges table same with Select Options in the selection screen. The different is the ranges table can call by every program in sap. Let start with that :
- Create structure via SE11 tcode with field SIGN, OPTION, LOW and HIGH
- Go to SE11 and choose Data Type -> Create, Fill the Short Text and go to menu EDIT -> Define as range Table Type
- Fill data element with your type data example : LGART , and Structured Row Type with structure that we created before and Activate
You can use the ranges table type like code below
DATA lt_lgart TYPE ZTR_LGART2.
DATA lt_lgart2 TYPE RANGE OF lgart.
*notes : you can easily create ranges internal table in program without select option with syntax TYPE RANGE OF [Data_element],but just for local only, if we need to call to another program please create like this tutorial
ThanksTags: Range Table ABAP