Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Populating Tables in CU60 Programmatically

pawadee_k
Participant
0 Likes
3,850

Is it possible to populate z-table that is normally maintained in CU60 programmatically?

The z-table isn't accessible via SE16n and also when I tried to retrieved its content via abap in SE38, the table isn't recognized.

Can someone point me to the right direction please?

Pawadee K

5 REPLIES 5
Read only

rajkumarnarasimman
Active Contributor
0 Likes
2,432

Hi Pawadee,


The z-table isn't accessible via SE16n and also when I tried to retrieved its content via abap in SE38, the table isn't recognized

Kindly check whether you are entering structure name or table name in SE16N. We can view tables in SE16N.

As per my understanding,  for the specific field in CU60, you are looking for the table name.

Regards

Rajkumar Narasimman

Read only

0 Likes
2,432

Hi Rajkumar,

I believed it a variant table, named Z_AIR_PRICING.

This is how it looked like in CU60

Read only

Former Member
0 Likes
2,432

Hi,

The tables maintained in cu60 are variant tables. We can read data from variant using FUNCTION MODULE: CARD_TABLE_READ_ENTRIES.

CALL FUNCTION 'CARD_TABLE_READ_ENTRIES'

EXPORTING

var_table = var_tab  " here you have give variant table name

TABLES

var_tab_entries = lt_entries " this will return the data from the table

EXCEPTIONS

error = 1

OTHERS = 2.

Read only

0 Likes
2,432

Hi Mohammed,

Is there a function that I can used to add/append/modify records in variant tables?

Read only

0 Likes
2,432

HI,

Currently i have no idea about. But if you want upload multiple records in variant table. create excel sheet of records and upload excel sheet vai tcode: CU60E. Hope this will help you..

Excel-Import (CU60E)

In order to do that, it is necessary that there is already a variant table structure in your system, which contains all the characteristics you want to use. Moreover, the Excel-file that you use to import the variant table content must of a certain form:

  • The columns must have the same order as in the variant table.
  • Use no header lines. The Excel table must only contain the characteristic values.
  • All characteristic values must have text format. (This also holds for numerical values.)
  • For the characteristic values only the language-independent format must be used.
  • The Excel-file must have .csv format.

If we were to fill the variant table for our example with the CU60E instead of the CU60 from section 4.1, the corresponding Excel-file would look as follows:

After you have prepared your Excel-file, you need to enter the name of the variant table and the location of the file in the transaction CU60E:

After pressing Execute(F8) the content of the Excel-file is transferred to the variant table.

Remark: Note that the CU60E does not support a change-import - when an Excel-file is uploaded, all entries in the variant table are deleted and replaced by the values from the Excel-file. In particular, a change-import using change numbers is not supported in the CU60E.

A more detailed documentation for the CU60E can be found in the attachment of note 516885.