Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Assign the value to fields of dynamic structures

$
0
0

Hi,

 

I'm reading the multiple sheets of excel and each sheet contains the different fields. The contents of the internal table are Row, Column and Value after reading the each sheet for every time. For example, after reading the 1st sheet, the internal table looks like below.

 

ROWCOLUMNVALUE
11PARTNER
12ROLE
219999
22UKM000
318888
32UDM000

 

For every sheet, this internal table is same but with different values.

 

Below are my structures.

 

TYPES: BEGIN OF ty_cred_prof,
          partner         TYPE bu_partner,
          partner_role  TYPE bu_role_screen,
        END OF ty_cred_prof,


BEGIN OF ty_cred_segm,
          partner              TYPE bu_partner,
          credit_sgmnt      TYPE ukm_credit_sgmnt,
          insur_limit          TYPE ze_insur_limit,
          insur_lmt_date    TYPE ze_insur_lmt_dt,
          mgmt_limit         TYPE ze_mgmt_limit,
          mgmt_lmt_date   TYPE ze_mgmt_lmt_dt,
          other_limit          TYPE ze_other_limit,
          other_lmt_date    TYPE ze_other_lmt_dt,
        END OF ty_cred_segm,


DATA: lt_cred_prof    TYPE TABLE OF ty_cred_prof,

          lt_cred_segm TYPE TABLE OF ty_cred_segm.

 

Now my requirement is to prepare the internal tables at runtime as my structures are different.

 

So that my internal table looks like

 

PartnerPARTNER_ROLE
9999UKM000
8888UDM000

 

Please help me to achieve above requirement.

 

Regards

Gangadhar


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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