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

Problem in mapping-BAPI to file.

Hi all,

I am working on an bapi to file scenerio.My requirement is 2 files need to created in the target ,

First file has the payload and its name(filename) needs to hav message id.

Second file is a catalog file which only holds the name of the first file(Howmany ever file are reaching target,this file wil hav names of all those files.).

I have used multi mapping wherein for the first structure i hav done dynamic configuration to generate filename and its wrking fine.

For the second stucture (has only 1 field for passing filename)i wrote following UDF and mapped it

String constant;

java.util.Map map;

map = container.getTransformationParameters();

constant = (String) map.get(StreamTransformationConstants.MESSAGE_ID);

String fileName = constant + ".txt";

return constant;

but now output of the second file is empty ie the filenames of the first file is not present in it.

Please help as its very urget.

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 May 17, 2008 at 10:13 AM

    Hi Shruti,

    Here you havent use the filename variable. I think you have to return file name. Just by adding .txt to string is it useful for converting file.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 17, 2008 at 04:24 PM

    heyy...thanks for that, but that was a typing mistake..problem is elsewhere, i had tested by mapping that field to a constant, even then no value was present in output.

    My structure looks like below.

    Messages

    Message1

    mt_abcd

    .

    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.