Skip to Content
Jul 28, 2020 at 08:42 AM

How to create a table or a structure dynamically if the value of the field is initial or space

140 Views Last edit Jul 29, 2020 at 07:03 AM 2 rev

Hi team,

i had one requirement where i need to compare two records.

Example , i need to compare VBAK table's record.
i have two vbelns , 123, 124
VBELN : 123 , 124.

Now , i'm giving the Table name, old 1st vbeln and second vbeln as input to a class method (Input to the method is dynamic , it can have any value), in which i'm dynamically selecting the data and comparing the field values and giving the output as below table format:


123 XXY

124 XXX

ERDAT , VKORG displaying as space since between 123 and 124 vbelns, both have same value and i will consider only the fields which had the difference and hence displaying the same which have the differences.

Now i want to delete ERDAT column and VKORG column as these fields have no values hence want to avoid in the output table.

I want to have output as :


123 XXY

124 XXX

This above VBAK table can be anything , like VBRK , KONV etc...

Can you give your input thoughts how can i create that output table dynamically.