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

need help in writing initial[] statment

Former Member
0 Likes
637

Hi

IF A ,B and C is initial.

give message as d is madatory.

endif.

if A is not initial.

check B and C is not intial.

do the things.

endif.

if B is not intial.

check C is not initial.

endif.

how to write the abap code for the same..

Regadds,

Sri

Hi

IF A ,B and C is initial.

give message as d is madatory.

endif.

if A is not initial.

check B and C is not intial.

do the things.

endif.

if B is not intial.

check C is not initial.

endif.

how to write the abap code for the same..

Regadds,

Sri

4 REPLIES 4
Read only

Former Member
0 Likes
596

ABAP is almost like what u have written

IF A IS INITIAL and B IS INITIAL and C is initial.
*....................give message as d is madatory.
    message 'D is mandatory' type 'E'.
endif.

if A IS NOT INITIAL.
check B IS NOT INITIAL and C IS NOT INITIAL.
*...................do the things.
....................
..................
.......................
endif.

if B IS NOT INITIAL.
check C is not initial.
....................
..................
.......................
endif.

Read only

0 Likes
596

thanks for quick response.

I have on one more doubt , iam using ranges from date and to date.

it is in range format.

how can i give from date for input and to date for input of another FM.

Regards,

Sri

Read only

0 Likes
596

hi Sri,

in ABAP we use select-options for declaring range.

like:

data: gs_sys type syst. 

SELECT-OPTIONS : S_DATE for gs_sys-datum. "a select option for date range is declared now.

***u can use them in ur FM like:
CALL FUNCTION 'XYZ_ASDASDASD' " your FM
EXPORTING
FROM_DATE = S_DATE-LOW "========> this is for the from field in select option
TO_DATE = S_DATE-HIGH "===========> this is for to field in sleect option
IMPORTING
XYZ = XYZ.
.........
......
............

hope this helps

Edited by: soumya prakash mishra on Jun 16, 2009 1:48 AM

Read only

0 Likes
596

sri, kindly follow the closing process.

thanks