cancel
Showing results for 
Search instead for 
Did you mean: 

File to IDOC .. Look up Problem.

Former Member
0 Kudos

Hi Experts,

Iam doing file to Idoc scenario .. In which iam sending PO Response (ORDERS) from fie to idoc.

Source

File

Target(LSname)

R/3 (LS356)

R/3 (LS357)

R/3 (LS358)

Code

A ( For LS356 )

B ( For LS357 )

C ( for LS358 )

Delivery ID

2536

2537

2538

GLN Code : 58899653

I have 4 fields in my look up table ..

CODE

GLN CODE

Delivery ID & Logical system

Using CODE and GLN Code as lookup key ---> I need to get the value of Delivery ID and Logical System.

So taking Delivery ID and LS name as key .. My source file will go to the corresponding R/3 system.

Its urgent .. Please respond asap.

Thanks

krupa.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

use code and GLN Code in receiver determination - conditions tab

Regards,

michal

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

First create the function moudle in r/3 with input fields CODE,

GLN CODE and output fileds Delivery ID and LS.

(ex: fm name : ZTEST , and pass the r/3 log in information to connect R/3 system)

create the simple UDF with 2 arguments in message mapping.

com.sap.mw.jco.*;

JCO.Repository mRepository;

// Change the logon information to your own system/user

JCO.Client mConnection = JCO.createClient(

"010", // SAP client

"XXXX", // userid

"xxxxx", // password

"EN", // language

"IDES", // host name

"00" ); // system number

// connect to SAP

mConnection.connect();

// create repository

mRepository = new JCO.Repository( "SAPLookup", mConnection );

// Create function

JCO.Function function = null;

IFunctionTemplate ft = mRepository.getFunctionTemplate("ZTEST");

function = ft.getFunction();

// Obtain parameter list for function

JCO.ParameterList input = function.getImportParameterList();

// Pass function parameters

input.setValue( a , "CODE" );

input.setValue( b , "GLN CODE" );

mConnection.execute( function );

String ret = function.getExportParameterList().getString( "Delivery ID" );

String ret = function.getExportParameterList().getString( " LS " );

mConnection.disconnect();

return ret;

Regards,

Venu.

Former Member
0 Kudos

Hi,

The problem is i cant write as static condition in receiver determination.

My Scenario is File to Idoc -- ( One legacy system to any of the 3 R/3 systems).

According to my requirement i need to write some 2 look ups

-


Delivery Look up table

-


CODE, GLN Code, Delivery ID, LogicalSystem

A, 58899653, 021085, LS356

B, 558899653, 021083, LS357

C, 58899653, 021082, LS358

Using Code and GLN Code as lookup key ---> get the value of Delivery ID and Logical System

-


IdocCtrlLookup

Purpose: To read the IdocCtrlLookup file to populate the Idoc control segment

-


valid control record has to found in IdocCtrlLookup file for Delivery ID

Delivery ID Sender Port Sender partnernumber RX Port RX partner num

021085 SAPGD2 GD2DVRC103 A000000046 GTEHHLD01

021083 SAPGD4 GD2DVRC122 A000000048 GTEHHLE01

021082 SAPGD4 GD2DVRC122 A000000047 GSEHHLE01

Please help how i can write the lookups and also how can i determine the Rx system dynamically with the above scenario.