Skip to Content
author's profile photo Former Member
Former Member

is there any function module so that i cant use uncomment lines

REPORT ZBDC5 .

parameters p_file type rlgrap-filename.

types: begin of ty_itab,

text(70),

end of ty_itab.

types: begin of ty_mara,

matnr(18),

mbrsh(1),

mtart(4),

maktx(35),

meins(3),

end of ty_mara.

data: imara type standard table of ty_mara,

wa_mara type ty_mara,

itab type standard table of ty_itab,

wa_itab type ty_itab.

at selection-screen on value-request for p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

PROGRAM_NAME = SYST-CPROG

DYNPRO_NUMBER = SYST-DYNNR

IMPORTING

FILE_NAME = p_file.

Start-of-selection.

DATA P_FILE1 TYPE STRING.

P_FILE1 = P_FILE.

*

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = p_file1

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = Itab

.

IF SY-SUBRC <> 0.

ENDIF.

*loop at itab into wa_itab.

*split wa_itab-TEXT at ',' into

*wa_mara-matnr wa_mara-mbrsh wa_mara-mtart wa_mara-maktx wa_mara-meins.

*append wa_mara to imara.

*clear wa_mara.

*clear wa_itab.

*endloop.

*

LOOP AT IMARA INTO WA_MARA.

WRITE: / WA_MARA-MATNR,

WA_MARA-MBRSH,

WA_MARA-MTART,

WA_MARA-MAKTX,

WA_MARA-MEINS.

ENDLOOP.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2008 at 10:33 AM

    can you be a little more clear..

    Regards

    VIjay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2008 at 10:39 AM

    USe FM "SAP_CONVERT_TO_CSV_FORMAT".

    Reward if helpful.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.