cancel
Showing results for 
Search instead for 
Did you mean: 

Insert entries in empty table

Former Member

Hello experts,

I got an easy question for you. How can I include new entries on any table that at the beginning does not have entries?. If the table has entries I can select one of them and insert new ones by debugging but I don´t know how to do it without entries

Thanks a lot

Regards

German

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member

Hi,

Go to se16,

Write the table name you need then click on the white paper ()

Insert your entries:

Finally, click on Save


OO
Participant
0 Kudos

This only works if in SE11 maintanance is allowed.

Former Member

Hello Carsten,

I have noticed that you got great knowlegde in ICWEB program structures. Thanks a lot for your help¡¡

But I was looking for another kind of answer, related to normal tables (SE16), I just want to insert new entries in a table that is empty (e.g but000). I don´t know how to insert entries if the table is empty

I think it is easier than the code you gave me hehe.

Thanks a lot¡¡¡

Regards

German

Former Member

Hi German,

If you know how to do it via debugging, then it should not be a problem for you. First of all, check what error message is it giving in SE16, when you try to create an entry for it.

In my case, it was giving-Table maintenance not allowed for table 'XYZ'.

So you just need to skip that statement which is throwing that exception.

Just put a breakpoint in Function Module-RS_TABLE_LIST_CREATE in SE37 transaction line-260.Skip line 261 via debugging and then you will see the table in insert mode. Insert and save your entry.

Its working for me.Can you please try it?

Regards,

Rohit

Former Member
0 Kudos

Hi, German.

Insert the table and run the command /H;

Enter the following variables below and modify them to X:

   GD-EDIT = X

   GD-SAPEDIT = X

Press <F8> button;

In the SE16N table screen press <F8> again and click the "append row" button to insert a new entry.

Click the save button.

Regards,

Rodrigo Vilarinho

former_member191572
Contributor
0 Kudos

Hi,

1. Go to SE16 enter the table name and execute.

2.Select any one entries from the table.

3. /h and click on the green tick on the top corner.

4.In the debugger, change the value of CODE = INSR.

5.Enter the required entries and click on save

Former Member
0 Kudos

Hello guys,

Definitely it is a good option to skip the validation for the error message. But once I´m able to insert the entries on the table, the system requires the transport order to be saved as usual.....I´m not allowed to create any order hehe.

Is there any other way?

Anyway rohit, charsten, thaks a lot for your help¡¡¡

daniel_hauser
Explorer
0 Kudos

Hello guys

Is there another way to insert the first entry in a table without debugging and modifying code? I need this because I do not have debug rights on the customizing client.

Thanks

Dani

CarstenKasper
Active Contributor
0 Kudos

Uups, I misread the question. Must be the routine, as most questions here regard the WebClient

Do as Rohit said. This will work.

cheers Carsten

CarstenKasper
Active Contributor
0 Kudos

Depends on the kind of table.

In case of value nodes you can simple do this:


data:
  lr_struct type ref to but000,
  lr_node type ref to cl_bsp_wd_value_node.

create data lr_struct.

create object lr_node exporting iv_struct_ref = lr_struct.

typed_context->MyNode->collection_wrapper->add( lr_node ).

If you have got model nodes it should even be simpler:


data:
  lr_entity type ref to if_bol_bo_property_access,
  lr_core type ref to cl_crm_Bol_core,
  lr_parent type ref to cl_crm_bol_entity.

* lr_parent needs to be filled by the node above in the BOL hierarchy
lr_parent = typed_context->ParentNode->collection_wrapper->get_current( ).
lr_entity = lr_parent->create_related_entity( 'SomeKindOfRelation' ).
typed_context->MyTable->collection_wrapper->add( lr_entity ).
lr_core = cl_crm_bol_core=>get_instance( ).
lr_core->modify( ).

I already shutdown the system. Thus I wrote the code out of my head. There might be minor flaws in it.

cheers Carsten