Application Development 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: 

regarding parameter

Former Member
0 Kudos

Dear Guys,

I have ADDONTABLE "ZTDOWNLOAD" HAVING THREE FIELDS

CLIENT CLNT

PROGRAMNAME CHAR 40

PATH CHAR 128

I am trying to fetch the filepath stored in addontable andplace it in parameter by default.

I tried below program. it displays only FPATH parameter with empty inputs.

why LDFPATH is not stored in FPATH parameter in screen.

could you pls advise me where i am going wrong..pls correct me in code.

Ambichan.

<<b>Code>
TABLES : ZTDOWNLOAD.

*“à•”ƒe[ƒuƒ‹
DATA: DTAB TYPE STANDARD TABLE OF ZTDOWNLOAD.
DATA: ITAB TYPE STANDARD TABLE OF ZTDOWNLOAD with Header line.

DATA : LDFPATH LIKE ZTDOWNLOAD-PATH.

DATA: BEGIN OF TAB_INFILE OCCURS 0,
DATA(200),
END OF TAB_INFILE.

SELECT * INTO TABLE DTAB FROM ZTDOWNLOAD CLIENT SPECIFIED WHERE
MANDT = SY-MANDT AND
PROGRAMM = SY-REPID.
IF SY-SUBRC = 0.
LOOP AT DTAB INTO ITAB.
LDFPATH = ITAB-PATH.
ENDLOOP.
ENDIF.

PARAMETERS FPATH LIKE ZTDOWNLOAD-PATH DEFAULT LDFPATH.

4 REPLIES 4

former_member221770
Contributor
0 Kudos

Ambi Chan,

Try this:

parameters: p_header LIKE ibipparms-path OBLIGATORY

DEFAULT 'C:\PO_Header.txt'.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_header.

CALL FUNCTION 'F4_FILENAME'

IMPORTING

file_name = p_header.

Cheers,

Pat.

athavanraja
Active Contributor
0 Kudos

check this

LOOP AT DTAB INTO ITAB.

LDFPATH = ITAB-PATH.

ENDLOOP.

the last record in the itab may be with empty field value for path.

better way is to

read tab dtab into itab with key <XXX> .

or

read tab dtab into itab index 1 .

LDFPATH = ITAB-PATH.

Regards

Raja

0 Kudos

or pass the default value in the initialization event.

Regards

Raja

Former Member
0 Kudos

Hi,

DATA: DTAB TYPE STANDARD TABLE OF ZTDOWNLOAD.

DATA: ITAB TYPE STANDARD TABLE OF ZTDOWNLOAD with Header line.

DATA : LDFPATH LIKE ZTDOWNLOAD-PATH.

DATA: BEGIN OF TAB_INFILE OCCURS 0,

DATA(200),

END OF TAB_INFILE.

PARAMETERS FPATH LIKE ZTDOWNLOAD-PATH DEFAULT LDFPATH.

<b>INITIALIZATION.</b>

SELECT * INTO TABLE DTAB FROM ZTDOWNLOAD CLIENT SPECIFIED WHERE

MANDT = SY-MANDT AND

PROGRAMM = SY-REPID.

IF SY-SUBRC = 0.

LOOP AT DTAB INTO ITAB.

LDFPATH = ITAB-PATH.

ENDLOOP.

ENDIF.

FPATH = LDFPATH.

Svetlin