Question

I am trying to populate the infoobject 0LOGSYS in a DSO when a load from a datasource occurs. The idea being that you could tell what sourcesystem the data was loaded from that is needed for a certain requirement. As of now I have a routine set up on a transformation rule for 0LOGSYS. No syntax errors, everything runs during the load, but no data is populated. Tried to debug but for some reason my BREAKPOINT is not getting picked up.

Here is the code that I have placed in the routine. Also, I am trying to do this without assigning any source field so maybe that is causing an issue. Not sure though.

TYPE-POOLS: RSSM.

Data: G_S_MINFO TYPE RSSM_S_MINFO.

CALL FUNCTION 'RSDG_ID_GET_FROM_LOGSYS'

EXPORTING

i_source_system = G_S_MINFO-LOGSYS

IMPORTING

e_soursysid = RESULT

EXCEPTIONS

id_not_found = 1.
Was it helpful?

Solution

Solved this a different way. There are runtime attributes that can be pulled from any request via the methods of "if_rsbk_request_admintab_view" which is instanciated automatically at the beginning of each transformation routine. Here is the code that I put in the routine.

*declaring a local variable like the result type LOGSYS
Data: lvSource like RESULT.

*runs a method to get the source system from the runtime attributes of
*the request
*"p_r_request" is an instance of "if_rsbk_request_admintab_view" which
*has many different methods for runtime attributes
lvSource = p_r_request->GET_LOGSYS( ).
RESULT =  lvSource.

OTHER TIPS

If this is the complete source code, it's not surprising that nothing is returned. You declare a new structured variable named G_S_MINFO, don't assign any value to it and return its contents. Unless you deleted the steps from your code sample that are supposed to fill the variable with values, it would be a grave bug if anything else than an initial value was returned.

EDIT: Even with the updated code, I still doubt this will work. Now you pass G_S_MINFO-LOGSYS to a function module that supposedly looks up some system ID without initializing it. Garbage in, garbage out. Or in this case, initial value in, initial value out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top