cancel
Showing results for 
Search instead for 
Did you mean: 

T code LTRS - Create include to multiple fields.

Former Member
0 Kudos


Dear Folks,

I have multiple fields for that i have to pass date and time which should be write in Include.

Please guide me how to do it in ABAP way. or any sample code.

- Regards,

Amol

Accepted Solutions (1)

Accepted Solutions (1)

srinivasan_vinayagam
Active Contributor
0 Kudos

Hi Amol,

Check this thread may you get solution for your date and time issue.

Regards,

V Srinivasan

Former Member
0 Kudos

Hi Srinivasn,

Actually i am confused, we have zh_date and zh_time fields added in BSEG table later we are goining to add same fields in multipal table..So how can i write logic in INCLUDE for everywhere i can use only include.

simply like that

zh_date = sy-datum?

-Regards,

Amol

srinivasan_vinayagam
Active Contributor
0 Kudos

Hi Amol,

Yes. Can try same.

Regards,

V Srinivasan

Former Member
0 Kudos

Hi Srinivasn,

I have checked some forums.

http://scn.sap.com/thread/3508902

In above forum where they are geeting field symbol <wa_s_lfa1>.

I mean how can find BSEG structure to pass value?

Saritha_K
Contributor
0 Kudos

Hi Amol,

zh_date = sy-datum wont work.

There is one way of achieving your requirement-

I will explain with an example here-

I have 2 tables for eg-

ZTEST1 ( with two fields mandt and matnr only in ECC)

ZTEST2 (with two fields mandt and matnr only in ECC)

step 1 Using LTRS - table settings I extend table ztest1 with two additional fields ZHDATE and ZHTIME.

step 2 Using LTRS - rule assignment and add logic in rule assignment as below rule -" event related"

and called an include specifically for ZTEST1 table

which has code-

if <WA_S_ZTEST1>-MATNR NE SPACE.(WA_S --indicates source fields)

  <WA_R_ZTEST1>-ZHDATE = SY-DATUM.(WA_R --indicates result set fields)

<WA_R_ZTEST1>-ZHTIME = SY-UZEIT.

ELSE.

   SKIP_RECORD.

ENDIF

I perform the same set of steps again for table ZTEST2 with a new include and same logic, just replaced ZTEST1 with ZTEST2.

You cannot have a common include for two tables if you are going for event related rule type.

Hope this helps you.

Regards,

Saritha K

.

Former Member
0 Kudos

Hi Saritha,

I really appreciate your reply, but for each time each table i need to create separate include.

I have date, time and timestamp filed in all table for that all table i have to write only single INCLUDE.

Is it possible?(Using dynamic fieldsymbol)

Thanks,

Amol

Answers (1)

Answers (1)

Saritha_K
Contributor
0 Kudos

Hi Amol,

Can you please explain your requirement with some example here?

Above statement is not very clear.

Regards,

Saritha K

Former Member
0 Kudos

Hi Sarita,

LTRS ->Rule Assignment We have BSEG table in that we have added time and date field, later it can be added in multiple table for that we need to write a code in only INCLUDE.

For that i need sample code.

or simply can i pass value in  assignment target field.

-Thanks

Amol