Application Development 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: 

ABAP 7.40 SP5: Filling itab cell

ralf_wenzel_heuristika
Active Participant
0 Kudos

Hi,

why the following coding does not work:

DATA:

  "! result of ship-to-party determination

  ship_to_party type kunnr,

  "! partners table

   "! one entry has an empty partn_numb

   partners type standard table of bapiparnr.

* ship-to-party determination

* ....

* partner-table is not filled completely,

* because one partner has no number,

* for this reason, we had to determine this number

* and now we want to write this number into the table

partner[ part_numb = space ]-partn_numb = ship_to_party.

* result: no sy-subrc, no exception, cell not filled!

2 REPLIES 2

former_member185414
Active Contributor
0 Kudos

Hello Ralf,

I tried on  below installation and it worked for me.

SAP_BASIS7400004SAPKB74004SAP Basis Component

Sample Code -

REPORT  ZA_1.

DATA:

   ship_to_party type kunnr value 10,

   ls_partner   type ZCDP_QUESTION,

   partner type standard table of ZCDP_QUESTION,

   partners type standard table of zcdp_Assessment.

insert ls_partner into partner INDEX 1.

partner[ question_id = space ]-COMPLEXITY_ID = ship_to_party.

BREAK-POINT.


* At this stage the value gets copied to the 'Complexity_ID' column in the same row of table.

* Please note that i have reused some structures and table types of my own here.


BR.


ChristianGünter
Contributor
0 Kudos

Hi Ralf,

working here too.

Btw. the new table and iteration expressions never set sy-subrc or other system variables.

In your example if the line is not present in the internal table the exception CX_SY_ITAB_LINE_NOT_FOUND if fired by the runtime system and leads, if not catched, to a shortdump.

Maybe ship_to_party is empty?

Regards Christian