cancel
Showing results for 
Search instead for 
Did you mean: 

export timepoint as date

imre_munkacsi
Explorer
0 Kudos

Hello Expert team,

We have an export structure (BRF to SAP) bind to a DDIC structure. This structure has a field, which has the domain DATUM (8 char string). In BRF+, it appears as timepoint, which is (I suppose) a BRF defined structure.

As we are trying to use in our code the original DDIC structure, the BRF+ program call won't run (dump) as data type incosistency. This is obvious, as the BRF+ is trying to fill a 8 char string with a structure.

Could you please advice, how could we solve this issue easily? We would like to prefer to keep the DDIC data bind. Is there a way to export this "brf internal timepoint" format as a 8 char string to the DATUM domain?

Thanks for your advice in advance!

Accepted Solutions (0)

Answers (3)

Answers (3)

shwetars
Advisor
Advisor
0 Kudos

nwould it be possible to paste your code here, I can then propose a more appropriate solutuion.

Former Member
0 Kudos

Hi Imre,

To convert from the BRFplus to the DDIC structure, you would need to write a conversion routine to read the BRF+ ts_range-r_low_value / ts_range-r_high_value and move them to your structure.

imre_munkacsi
Explorer
0 Kudos

Thanks for the reply.

If that is the case, that would be quite disappointing.

In my understanding, BRF+ supposed to ease the development process of complex logics. This solution is the opposite, really.

I hope there is also a "nice" solution as well.

carsten_ziegler
Active Contributor
0 Kudos

Please take a look at the code template. The generated code provides you with a conversion method.

shwetars
Advisor
Advisor
0 Kudos

Hi Imre,

Like Carsten said if you were to use the code template you would see that a BRF+ structure is created with components as shown below:- la_IV_DATUM-type = [INSERT CONTEXT VALUE HERE OR DELETE THE LINE]. 

la_IV_DATUM-date = [INSERT CONTEXT VALUE HERE OR DELETE THE LINE DEPENDING ON YOUR TIMEPOINT TYPE].

la_IV_DATUM-time = [INSERT CONTEXT VALUE HERE OR DELETE THE LINE DEPENDING ON YOUR TIMEPOINT TYPE].

la_IV_DATUM-timestamp = [INSERT CONTEXT VALUE HERE OR DELETE THE LINE DEPENDING ON YOUR TIMEPOINT TYPE].

GET REFERENCE OF la_IV_DATUM INTO lr_data.

ls_name_value-value = lr_data.

INSERT ls_name_value INTO TABLE lt_name_value.

So you can directly assign your ddic bound variable to the DATE component of this structure.

Also the generated class contains methods for data conversion which you could use before making the BRF+ process call.

Regards,

Shweta

Former Member
0 Kudos

I think Imre is asking how to convert from the BRFplus date format (internal) to the DDIC date format (external). What you are describing is the conversion from external format to the BRFplus internal format.

Regards,

Shahram

shwetars
Advisor
Advisor
0 Kudos

The BRF+ dataobject of type: TIMEPOINT has an attribute called: Timepoint type - this can be set as Date so that BRF+ itself does the necessary conversions. check attachment

imre_munkacsi
Explorer
0 Kudos

It is set to "date" by default - so it is "date", but the program still dumps.

In debugger mode the exported <la_any> field appears as a (timepoint) structure.