cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP in Update rules

thecardinal
Contributor
0 Kudos
110

I have an item level ODS object which contains records like this:

Header

Item 1

Item 2

The header record contains the header status and the items contain the item status.

I want to add an infoobject to the ODS to hold the header status at item level too.

I am thinking that the best thing to do would be to modify the update rules to get the header status from the header record rather than modifying the datasource as I already have the data.

Problem is I am not an ABAPer, can anybody help me with how I can retrieve the header record in the update rules?

Accepted Solutions (1)

Accepted Solutions (1)

thecardinal
Contributor
0 Kudos

The item number exists in all lines. Could I do something like this do you think?

SELECT SINGLE [Status] INTO result from [ODS] WHERE

[ODS.Order] = COMM_STRUCTURE-[Order] AND [ODS.Item] = 0

I think I could, but how do I identify which table the ODS data is in?

edwin_harpino
Active Contributor
0 Kudos

hi,

if you mean ods table name, then it's follow /bi0/a[odsname]00 for business content and /bic/a[ods name]00 for customized.

Former Member
0 Kudos

Hi Stuart,

Do it from ODS active table . If it is a custome ODS name of the active table is /BIC/A<odsname>00. or if it is a standard one /BI0/A<odaname>00.

you can select require data from this.

hope this helps.

Srini

Former Member
0 Kudos

Hi Friends,

be carefull, if a new order with hdr and itm is loaded, the hdr-data for the itm's are not in the active ODS but in the datapack I think.

/manfred

thecardinal
Contributor
0 Kudos

Manfred,

Can you elaborate please.

Do you think that this is not possible, or are you saying that I should get the header status from the /BIC/D[ODS]00 table?

Cheers,

thecardinal
Contributor
0 Kudos

I meant the /BIC/A[ODS]40 table.

edwin_harpino
Active Contributor
0 Kudos

hi,

/manfred, you are right.

i think we can load the header data first and have it activated then load the item data (use process chain).

    • if data_package then we may have to go to psa since data_package is processed packet by packet.

Former Member
0 Kudos

Hi A.H.P.,

thats the way, if the hdr where loaded first(and activated) than the itemrecs can read their hdr-data from ODS.

/manfred

thecardinal
Contributor
0 Kudos

Problem is that the header and item records are extracted and loaded at the same time. I am using the standard datasource 0CRM_COMPLAINTS_I.

So the records will not be active in the ODS at this point.

Based upon your other replies I can't get the data from the /BIC/A[ODS]00 table, but will the header be in the /BIC/A[ODS]40 table?

if not, can I get the data from the PSA table and if so what would the name of the database table be?

Cheers,

Former Member
0 Kudos

Hi Stuart,

could only be done from psa, table RSTSODS contains the psatabname, field = ODSNAME_TECH

/manfred

thecardinal
Contributor
0 Kudos

One more thing.

Do I need to know which request to get the record from or does the PSA only contain the data from the last request?

edwin_harpino
Active Contributor
0 Kudos

hi Stuart,

my suggestion is do this in crm side, in user exit zxrsau01

data : l_s_comp like [0crm_complaints_i extract structure],

l_tabix like sy-tabix.

case i_datasource.

when '0crm_complaints_i'

l_tabix = sy-tabix.

  • if item, item guid not blank

if not l_s_comp-item_guid is initial.

  • look from header data, from crmd_orderadm_h ?

select [headerstatus] into l_headerstatus

from crmd_orderadm_h.

if sy-subrc = 0.

l_s_comp-[header status] = l_headerstatus

endif.

endif.

modify c_t_data from l_s_comp index l_tabix.

endcase.

Former Member
0 Kudos

Hi,

PSA contains all requests loaded through the transfer structure associated with it and not deleted yet.

Best regards,

Eugene

Answers (0)