Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

default value for field in custom tcode

anjalikushwah
Explorer
0 Likes
3,119

Hi All,

I have a custom T code and it contains a field GJAHR-COSP(Fiscal year) whose default value is set to 2019 now i want to change the default value to 2020,experts could you please guide me for this.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

MateuszAdamus
Active Contributor
2,491

Hi anjalikushwah

If it is not set in variant, as christopher.solomon suggested, then it might be set directly in the executed report. You would need to check the source code of the report then.

Most probably it's set somewhere in the SELECTION-SCREEN definition - at the point, where the field is defined. But it could also be set in INITIALIZATION or AT SELECTION-SCREEN events.

regards,
Mateusz

10 REPLIES 10
Read only

ChrisSolomon
Active Contributor
0 Likes
2,491

I am guessing you actually mean the VARIANT. Can you explain more? The T-code has nothing to do with a field value....it just says WHICH program to run.....unless you also define a VARIANT....and in that, you can define "default" field values.

Read only

0 Likes
2,491

Thank u christopher.solomon for your response

Read only

MateuszAdamus
Active Contributor
2,492

Hi anjalikushwah

If it is not set in variant, as christopher.solomon suggested, then it might be set directly in the executed report. You would need to check the source code of the report then.

Most probably it's set somewhere in the SELECTION-SCREEN definition - at the point, where the field is defined. But it could also be set in INITIALIZATION or AT SELECTION-SCREEN events.

regards,
Mateusz

Read only

2,491

haha we all got "minus one" .....awesome! 😃

Read only

0 Likes
2,491

sorry i am new user ,i don't know why u got -1.

Read only

venkateswaran_k
Active Contributor
0 Likes
2,491

Dear Anjali,

If it is a parameter field you could do as below in INITIALIZATON section.

INITIALIZATION.
p_gjahr = sy-datum+0(4).

Regards,

Venkat

Read only

0 Likes
2,491

Thank u Venkat for your response

Read only

Sandra_Rossi
Active Contributor
2,491

You say it's a custom T code (Transaction code) so a custom program I guess, so a program that people around here don't know at all. How do you think we can help? Only you have access to this program. First answer your own question: how is this "default value" set to 2019? (and you will probably get the answer)

Read only

former_member1716
Active Contributor
2,491

anjalikushwah,

As sandra.rossi rightly said it is custom, we would have no idea how it would be defaulted. Probably if you could find how the value is being defaulted to 2019 you yourself would find the solution.

If you still don't understand the code logic on how it is filled, you may ask our guidance with the exact code so that we can guide.

Regards!

Read only

anjalikushwah
Explorer
0 Likes
2,491

Hi Experts ,

Thank you for answering my query,

Here i want to mention that t code is customized but the program that is running for this tcode is GP3JJMT84YR5YI5BP4U0VR4TWQU100,and i tried to find the variant for this but couldn't find any variant for this particular tcode in shd0.