Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8468

Dynamic Structures

$
0
0

Hi All,

 

As the below code is works only for the condition table 306 as  I created my header structure based on the following fields header, vkorg, vtweg, pltyp, waerk .Bu t I want my header structure  to be  dynamic so that it should work for all the condition tables.

 

SPLIT i_string_line-input_str AT cl_abap_char_utilities=>horizontal_tab

INTO i_header_line-header
          i_header_line-vkorg
          i_header_line-vtweg                                                                              
          i_header_line-pltyp                                                                              
         i_header_line-waerk.    


In the above syntax based on the condition table I selected on selection screen my flat file is as below.


case 1: If condition table given is 304


H    SalesOrganization    DistributionChannel    Customer

I    Material    Releasestatus    Amount    Currency    ValidFrom    ValidTo


case 2: If condition table given is 305


H    SalesOrganization    DistributionChannel

I    Material    Releasestatus    Amount    Currency    ValidFrom    ValidTo


case 3: If condition table given is 306


H    SalesOrganization    DistributionChannel     PriceListType     DocumentCurrency

I    Material    Releasestatus    Amount    Currency    ValidFrom    ValidTo

                                                         

In the above code i_string_line-input_str contains the following heading of fields based on the condition table we select in selection screen.when I want to split them into respective fields using INTO clause my structure should change dynamically.How can I achieve it and my entire program is in OOPS ALV.Thanks in Advance.


Regards,

Chakradhar.


Viewing all articles
Browse latest Browse all 8468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>