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

The Program is going to dump

REPORT ZABC .

DATA: PATH_FILE1(100) TYPE C,

PATH_FILE2(100) TYPE C.

PARAMETERS: P_PATH1(50) TYPE C DEFAULT

'
P06APOR3\VAROPT\APO\MTHEND\DEMAND\LOADFILES',

P_FILE1(50) TYPE C DEFAULT

'CPT_LC.CSV',

P_PATH2(50) TYPE C DEFAULT

'
P06APOR3\VAROPT\IRMS\P06860\APOOUT\',

P_FILE2(50) TYPE C.

DATA : TEST(50) VALUE 'LISTCUBE_CPTR_FMT_',

TEST1(50) VALUE 'LISTCUBE_GLUE_FMT_'.

IF P_FILE1 EQ 'CPT_LC.CSV'.

CONCATENATE TEST SY-DATUM0(4) SY-DATUM4(2) SY-DATUM+6(2) INTO TEST.

TRANSFER TEST TO P_FILE2.

ELSEIF P_FILE1 EQ 'GLUE_LC.CSV'.

CONCATENATE TEST1 SY-DATUM0(4) SY-DATUM4(2) SY-DATUM+6(2) INTO TEST1.

TRANSFER TEST1 TO P_FILE2.

ENDIF.

write : ' P_FILE2'.

The above program is going to dump . Please help me to get the exact solution.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 02:42 PM

    What kind of Dump occurs ?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 02:44 PM

    Hello,

    I have tested ur report in my system.

    I don't know y u r using TRANSFER

    <b>TRANSFER TEST TO P_FILE2.</b>

    INstead use:

    <b>MOVE TEST TO P_FILE2.</b>

    write : P_FILE2. " Remove the quotes...

    If useful reward.

    Vasanth

    Message was edited by:

    Vasanth M

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 02, 2007 at 02:45 PM

    Hi,

    Before u use the command TRANSFER, you should use the command OPEN DATASET.

    Might be this is the problem in your program.

    Hope this solves your problem.

    Enjoy SAP

    Rajasekhar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 02, 2007 at 02:46 PM

    Hi,

    Welcome to SDN.

    Do you want to download the data to specified path then use OPEN DATASET statement before Transfer.

    If you just wanna to mave it to the internal table use MOVE command.

    Regards,

    Amit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 02:47 PM

    Transfer is used when u need to transfer data to application server....

    in ur scenario u want to populate the field with value and then use it for write statement...

    REPORT ZABC .

    DATA: PATH_FILE1(100) TYPE C,

    PATH_FILE2(100) TYPE C.

    PARAMETERS: P_PATH1(50) TYPE C DEFAULT

    '
    P06APOR3\VAROPT\APO\MTHEND\DEMAND\LOADFILES',

    P_FILE1(50) TYPE C DEFAULT

    'CPT_LC.CSV',

    P_PATH2(50) TYPE C DEFAULT

    '
    P06APOR3\VAROPT\IRMS\P06860\APOOUT\',

    P_FILE2(50) TYPE C.

    DATA : TEST(50) VALUE 'LISTCUBE_CPTR_FMT_',

    TEST1(50) VALUE 'LISTCUBE_GLUE_FMT_'.

    IF P_FILE1 EQ 'CPT_LC.CSV'.

    CONCATENATE TEST SY-DATUM0(4) SY-DATUM4(2) SY-DATUM+6(2) INTO TEST.

    <b>MOVE TEST TO P_FILE2</b>.

    ELSEIF P_FILE1 EQ 'GLUE_LC.CSV'.

    CONCATENATE TEST1 SY-DATUM0(4) SY-DATUM4(2) SY-DATUM+6(2) INTO TEST1.

    <b>MOVE TEST1 TO P_FILE2</b>.

    ENDIF.

    <b>write : P_FILE2.</b>

    Message was edited by:

    Ramesh Babu Chirumamilla

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 02:48 PM

    you need to open the file firrt

    before transferring u need to open the file

    OPEN DATASET filename for input in text mode.

    TRANSFER ...

    CLOSE DATASET .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 02:48 PM

    Hi,

    Copy this and paste and run the report.....

    *REPORT ZABC .

    DATA: PATH_FILE1(100) TYPE C,

    PATH_FILE2(100) TYPE C.

    PARAMETERS: P_PATH1(50) TYPE C DEFAULT

    '
    P06APOR3\VAROPT\APO\MTHEND\DEMAND\LOADFILES',

    P_FILE1(50) TYPE C DEFAULT

    'CPT_LC.CSV',

    P_PATH2(50) TYPE C DEFAULT

    '
    P06APOR3\VAROPT\IRMS\P06860\APOOUT\',

    P_FILE2(50) TYPE C Default 'CPT_LC.TXT'.

    DATA : TEST(50) VALUE 'LISTCUBE_CPTR_FMT_',

    TEST1(50) VALUE 'LISTCUBE_GLUE_FMT_'.

    OPEN DATASET P_FILE2 FOR OUTPUT IN TEXT MODE encoding default.

    IF P_FILE1 EQ 'CPT_LC.CSV'.

    CONCATENATE TEST SY-DATUM0(4) SY-DATUM4(2) SY-DATUM+6(2) INTO TEST.

    TRANSFER TEST TO P_FILE2.

    ELSEIF P_FILE1 EQ 'GLUE_LC.CSV'.

    CONCATENATE TEST1 SY-DATUM0(4) SY-DATUM4(2) SY-DATUM+6(2) INTO TEST1.

    TRANSFER TEST1 TO P_FILE2.

    ENDIF.

    Close dataset P_FILE2.

    write : ' P_FILE2'.

    Please close the thread

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2007 at 02:57 PM

    Thnx for the Forum , i got the real result .

    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.