TCA Java APIs not able to validate input against LOOKUP table
Hi there,
I am using the TCA Java APIs to create new source system references like so:
HzOrigSystemRefPub wrapper = new HzOrigSystemRefPub();
wrapper.createOrigSystemReference(connection, "T", record, x_return_status, x_msg_count, x_msg_data);
The record has the following attributes set:
l_orig_sys_reference_rec.created_by_module := 'TCA_V2_API';
l_orig_sys_reference_rec.owner_table_name := 'HZ_PARTIES';
When I run my java code however, the call returns an error saying that the values I have mentioned in the above two attributes were not in my lookup tables:
1. Value for owner_table_name must be a value defined in lookup type TCA_OWNER_TABLE.
2. Value for created_by_module must be a value defined in lookup type HZ_CREATED_BY_MODULES.
When I run queries directly against the database in SQLDeveloper, I am able to find these values. They do exist.
For some reason, when using the Java API, it cannot find the lookup values.
I even tried calling the PL/SQL API from Java and the same problem exists.
Is this a bug?
Can anyone please help me?
Thanks in advance!
OK, solved my own problem.
The solution is to set the language environment variable to 'AMERICAN'.
It's a known bug.
Set it from your Java code like this:
OracleCallableStatement setter =
-------(OracleCallableStatement)connection.prepareCall(
-------"ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'");
setter.execute();
Now any calls after this statement to the Java APIs will work.
Cheers!
Similar Messages
-
Not able to validate the xml document against DTD using SAX
Hi ,
i am not able to validate xml document against its DTD using SAX parser even after setting setValidating = true. even if the file is not correct according to DTD , it is not throwing any exception. what could be the reason.? please help..
kranthi
this is the code sample i used.
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(true);
try {
factory.newSAXParser().parse(new File("sample.xml"), handler);
} catch (SAXException e) {
e.printStackTrace(); System.exit(2);
} catch (ParserConfigurationException e) {
e.printStackTrace();
}Hi karthik
Thanks for your response
Actually iam a beginner in java coding hence struggling to come up with the things
I tried putting your code and onserver side i see it is returning 09:12:17,234 INFO [STDOUT] [root: null]
actually the same program i wrote in java
and the same method i was calling from the main
and it is working fine and the xml document is getting displayed one important thing to be noted here is that the factory.newDocumentBuilder().parse(new File(filename));is returing XmlDocument
and the printing takes place
but the in same method public static Document parseXMLFile(String filename, boolean b) in servlet
the line factory.newDocumentBuilder().parse(new File(filename)); is returning DeferredDocumentImpl
and this creating problem , had it returned XmlDocument
i would have printed the elements one one
but as it is returning deferredimpl
iam unable to print the elements
could you please tell me why factory.newDocumentBuilder().parse(new File(filename)); is returning DeferredDocumentImpl
in servlets but in plain java pogram it is returing XmlDocument
Thanks
Bhanu -
Problem with creating customer account using TCA Java API
Hi,
I am trying to create customer account using TCA java API. i am getting exception saying PL/SQL numeric error: character to number conversion. but this error raises when calling API method
HzCustAccountV2Pub.createCustAccount.
can any body help me in solving this issue, any clue why this exception raises. i have tested even the code given in TCA API user guide. that code also gets same error.package client;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.sql.DriverManager;
import java.sql.SQLException;
import oracle.jdbc.driver.OracleConnection;
import oracle.jdbc.driver.OracleCallableStatement;
import oracle.jdbc.driver.OracleTypes;
import oracle.apps.ar.hz.v2api.HzCustAccountV2Pub;
import oracle.apps.ar.hz.v2api.HzPartyV2Pub;
import oracle.apps.ar.hz.v2api.HzCustomerProfileV2Pub;
class CreateCustAccount {
public static void main(String[] args) throws Exception {
HzCustAccountV2Pub.CustAccountRec p_cust_account_rec = new HzCustAccountV2Pub.CustAccountRec();
HzPartyV2Pub.PersonRec p_person_rec = new HzPartyV2Pub.PersonRec();
HzCustomerProfileV2Pub.CustomerProfileRec p_customer_profile_rec = new HzCustomerProfileV2Pub.CustomerProfileRec();
BigDecimal[] x_cust_account_id = new BigDecimal[1];
String[] x_account_number = new String[1];
BigDecimal[] x_party_id = new BigDecimal[1];
String[] x_party_number = new String[1];
BigDecimal[] x_profile_id = new BigDecimal[1];
String[] x_return_status = new String[1];
BigDecimal[] x_msg_count = new BigDecimal[1];
String[] x_msg_data = new String[1];
try
Class.forName ("oracle.jdbc.driver.OracleDriver");
OracleConnection conn = (OracleConnection) DriverManager.getConnection ("jdbc:oracle:thin:@ebiztst.trianz.int:1526:PATCH","apps","apps");
HzCustAccountV2Pub custaccountV2Pub = new HzCustAccountV2Pub();
p_cust_account_rec.account_name = "John Ac";
p_person_rec.person_first_name = "John";
p_person_rec.person_last_name = "Smith";
p_cust_account_rec.created_by_module = "TCA_EXAMPLE";
HzCustAccountV2Pub.createCustAccount(
conn
, "T"
, p_cust_account_rec
, p_person_rec
, p_customer_profile_rec
, "F"
, x_cust_account_id
, x_account_number
, x_party_id
, x_party_number
, x_profile_id
, x_return_status
, x_msg_count
, x_msg_data
System.out.println( "x_return_status = " + x_return_status[0] );
System.out.println( "x_msg_count = " + x_msg_count[0] );
System.out.println( "x_msg_data = " + x_msg_data[0]);
if (x_msg_count[0].intValue() > 1) {
OracleCallableStatement ocs = null;
for (int i=0; i<x_msg_count[0].intValue(); i++) {
ocs = (OracleCallableStatement)conn.prepareCall(
"begin ? := fnd_msg_pub.get( p_encoded => ’F’ ); end;");
ocs.registerOutParameter(1, OracleTypes.VARCHAR);
ocs.execute();
System.out.println((i + 1) + ". " + ocs.getString(1));
conn.close();
} catch (ClassNotFoundException e) {
System.out.println("Driver Not Found: " + e);
} catch (SQLException e) {
System.out.println("SQL Error." + e);
} -
Hi,
I'm using TCA Java APIs to insert and update entities in the TCA model.
I am trying to create a Customer Account. In HZ_CUST_ACCOUNT table for the ORIG_SYSYTEM_REFERENCE column i need to insert value generated by a sequence. How to do this using the Java API ?
Thanks
VidyaI am not sure about Java API but I have used the standard customer import interface tables in my case I have created a sequence and incremented for each record.
-
SAPMMC Java instance not able to start
Hi All,
I have installed CE.7.1 version yesterday after installing the same
In SAPMMC Java instance -xxxx00) and the central services instance xxxxx01 both have been started.
But when I am trying today java instance which is -xxxx00 is not able start.
Here we can see 2 process 1 is Jstart.Exe (As java) which is showing status as stopped
Where as igswd.exe which is showing running.
So here problem is Jstart.Exe (As java) is not able to start.
Can you suggest me what should I do to activate the same?
Regards
IshikeshHi Ishiikesh,
Please check and update JAVA_HOME system enviromental variable in my computer (My computer > Priperties >> Advance >> Startup and Recovery >> Enviromental Variable >> System Variables >> Add new JAVA_HOME parameter with path for installed Java JDK)
Also please check database server services (Start > Run > Services.msc >> Start your database services manually and change properties as automatic)
Then try to re-start the server.
Hope it helps
Regards
Arun -
Java aplication not able to detect card reader sometimes
Hi
We have a Java application (jre1.6.0_05.) which runs as window service under "Local System". It tries to detect card reader after every one minute. Normally it is working fine. However on some machines (which can be Windows XP, 2003 Server etc) some times it is not able to detect Card Reader, while other applications (which are not Java based) are able to detect. Sometimes service restart helps in solving the issue, but it reoccurs again after few hours/days.
Below is the exception we get:
javax.smartcardio.CardException: list() failed
at sun.security.smartcardio.PCSCTerminals.list(PCSCTerminals.java:109)
at javax.smartcardio.CardTerminals.list(CardTerminals.java:55)
Below is the code we are using to get list of terminals:
TerminalFactory factory = TerminalFactory.getDefault();
try {
terminals = factory.terminals().list();
} catch (CardException e) {
e.printStackTrace();
}Any idea what might be causing this random problem?Hi,
According to the source for OpenJDK 6 (b19) the only way to get the exception you posted was with a PCSCException being thrown with the root exception wrapped in the new exception.
// from PCSCTerminals.list(State state)
try {
// do some stuff to get the reader list
} catch (PCSCException e) {
throw new CardException("list() failed", e);
}If this was not the case in the version you have, you will definitely see the root cause with the new JDK.
Cheers,
Shane -
BI Publisher Java API not displaying Barcode in PDF Report
Hi Team,
I have used BI Publisher java API in my ADF Application to generate PDF reports. It is not displaying barcodes in the PDF Reports. I have included Code 39 ttf file in my java home as well. Please let me know if any other configuration needs to be done.
I am using jdev version 11.1.2.0.0. Please help me out if anyone knows the solution to this problem.
Thanks in advance,
Kavitha{forum:id=245} is the BIP forum.
-
I AM WORKING WITH LABVIEW 6.1.MY PROJECT IS "WATER LEVEL CONTROL"USING "PID"AND FUZZY CONTROLLER. MY PID CONTROLLER IS WORKIN.BUT FOR THE FUUZY CONTROLLER I AM USING YOUR "FUZZY LOGIC TOOLKIT"I HAVE MADE A PROGRAM IN IT. BUT I AM NOT ABLE TO GIVE MY INPUT THROGH DATA ACQUISTION.AND ALSO NOT ABLE TO GET THE OUTPUT(CONTROL SIGNAL).
WHERE I CAN SEE THE ANSWER.Are you using NI's PID control VIs for your PID controller? Are you able to acquire any signals through your data acquisition? What I would suggest is that you try to run one of the shipping examples that comes with the Control Toolkit (perhaps the one titled, "Tank - fuzzy DAQ.vi"). Hope that helps.
-
Web Dynpro Java WIki - Not able to add a new page.
Hi Experts,
I want to add a new wiki page in Web Dynpro Java, but i am not able to find corresponding button or action to create a new page.Please guide me to add a new page.
Thanks and Regards
Fazal AhamedHi Fazal,
This is probably due to the Expert Wki which was launched last week. Please see Craig's blog for more details: /people/community.user/blog/2009/06/17/welcome-the-expert-wiki
BR,
Hilit -
Not able to see data in Pivot table
Hi,
I have a issue with pivot table i have a column which displays values 0 and 1 and another column called month when i am placing this month column as a section and values column as a measure i am not seeing any values means i can see the month as header but instead showing 0 or 1 its showing blank columns. previously i created similar kind of table it worked but at that time values column data type is number this time its char. can anybody help me out how i can see the data in the pivot table. i already tried converting this column to number but still i am not able to see data in that values column.
ThanksHi copter,
Place the month column in rows and value column in measure section and check if results are coming.If still it doesnt come i suppose you dint apply aggregation rules to value column.In pivot view click values column and aggregate by /select min or max or either server complex and check your results.
(I suppose your aggregation rules is default)....Correct this one and you can place it in sections as per your requirement.
Cheers,
KK -
Hi All,
I have implemented the Out of Box solution of Order Management Analytics module with 11.5.10 version of Oracle EBS and respective adopters. Under the same I am not able to notice any mapping to load the data into W_CUSTOMER_STATUS_HIST_F_TMP table and due to which it causing few reports under order management.
Could you please tell me the mappings name for this Target Table so that I can verify from my side if it has been missed or so?
I am finding this W_CUSTOMER_STATUS_HIST_F_TMP table is getting used as Source Table under the folder of PLP for the mapping as,
PLP_CustomerStatusHistoryFact_Extract
PLP_CustomerStatusHistoryFact_Old_Customers_Load
and PLP_CustomerStatusHistoryFact_Extract
Thanks,
-VinayNot sure this would help but As per data lineage guide, it says PLP_CustomerStatusHistoryFact_Extract mapping populates this table from series of different tables. Later, From temp table it goes to W_CUSTOMER_STATUS_HIST_F table via mapping PLP_CustomerStatusHistoryFact_New_Customers_Load
~r -
Not able to see all the SAP tables from CR 2008
Hi All,
1)I am not able to see all the SAP database tables(DEV server) from Database expert menu in CR 2008. Only tables those start with alphabet letters upto A & B are visible. I checked the database connection>right click>options> found no filters as well.
We are using the CR 2008 trial version with SAP ECC.
2) When i am trying with Production Server of SAP ECC, I am not able to logon to the SAP from CR 2008. It is giving error message
as : LOGON FAILED : User USER1 has no RFC AUTHORIZATION for function group SYST
Please help me to resolve these. Thanks in advance.Thank you very much ingo.
You helped me a lot.
One more question, when I am trying for SAP database connections say for ex: 10.57.410.70, again and again some times the connection is getting saved in my connections with as new versions/variants like
10.57.410.70_1 or so. How to overcome this.
Thanks in advance ingo
Badari -
Not able to select MS SQL Server tables in sqldeveloper using dblink
Hi All,
I able tp select MS SQL table columns in sqlplus prompt but i am not able to select same thing in sql developer using dblink.
If i use convert(<mycol>,'WE8ISO8859P1','utf8') in sqldeveloper its working, how to select MS SQL columns without convert function.
Thanks,
-ManiMani,
This is a problem with SQL*Developer and converting nvarchar characters.
The workround is to install the Oracle client software and use the option in SQL*Developer -
- Tools
- Preferences
- Database
- Advanced
- and click the 'Use OCI/Thick driver' option.
I made these steps -
- download the 11.1 client software from eDelivery -
http://edelivery.oracle.com/
- go through the administration screens (name, etc)
- on the next screen ' Media Pack Search' screen choose -
- Select a Product Pack - Oracle database
- Platform - Microsoft Windows (32-bit)
- Oracle® Database 11g Release 1 (11.1.0.6.0) Media Pack for Microsoft Windows (32-bit)
- then download -
Oracle® Database 11g Release 1 Client (11.1.0.6.0) for Microsoft Windows (32-bit) CD
- Install the Instant Client and also apply the 11.10.7 patchset to the ORACLE_HOME where you install the client. (if you are using 11.1.0.7 RDBMS)
- for Windows change the PATH system variable to make sure the 11.1 RDBMS and Client ORACLE_HOME directories are listed before any other Oracle directories
- started SQL*Developer and clicked the 'Use OCI/Thick driver' option
- could then run the select -
select "col2" from test_nvarchar@dg4msql ;
without any problems.
If this is still a problem for you then let us know the description of the columns in the SQL*Server table that give the problem and the exact errors you receive.
Regards,
Mike -
Use MDM java Api for saving an image to mdm image table
Hi experts
I want to save an image from web dynpro java to MDM image table using java Api's
Can anyone provide a code snippet .
I am using MDM 7.1 sp6.
Thanks and regards
SureshHello Suresh
Unfortunatly, this is no possible, i mean, to load images to mdm repository through JAVA API.
Sure you can do it directly to database ( but for that you need to do saome investigation)
Here you can found JAVA API classes for MDM:
http://help.sap.com/javadocs/MDM71/
Next two classes are working with BLOBs (pdf, images, video, etc.) in MDM repository:
com.sap.mdm.blobs
com.sap.mdm.blobs.commands
Regards
Kanstantsin chernichenka
Edited by: kanstantsin_ch on Sep 8, 2011 2:36 PM -
I am not able to fill up my output table
I'm fresher to ABAP.
I am not able to fill up my output internal table. please help in correcting my select statements.
Please help me.
I am pasting my code here.
DATA: BEGIN OF marc_tab OCCURS 0,
matnr LIKE marc-matnr, " Material Number
eislo LIKE marc-eislo, " Minimum Safety Stock
mabst LIKE marc-mabst, " Maximum stock level
eisbe LIKE marc-eisbe, " Safety stock
werks LIKE marc-werks, " Plant
ekgrp LIKE marc-ekgrp, " Purchasing group
dispo LIKE marc-dispo, " MRP controller
END OF marc_tab.
DATA: BEGIN OF mard_tab OCCURS 0,
lgort LIKE mard-lgort, " Storage Location
speme LIKE mard-speme, " Blocked stock
umlme LIKE mard-umlme, " Stock in transfer
insme LIKE mard-insme, " Stock in quality inspection
retme LIKE mard-retme, " Blocked Stock Returns
labst LIKE mard-labst, " Valuated stock with unrestricted use
END OF mard_tab.
DATA: mard_tab1 LIKE STANDARD TABLE OF mard_tab WITH HEADER
LINE.
Material and description
DATA: BEGIN OF mara_makt_tab OCCURS 0,
matnr LIKE mara-matnr, "Material number
maktx LIKE makt-maktx, "Material description
END OF mara_makt_tab.
DATA: BEGIN OF eord_lfa1_tab OCCURS 0,
matnr LIKE eord-matnr, "Material number
ebeln LIKE eord-ebeln, "Scheduling Agreement
lifnr LIKE eord-lifnr, "Vendor's account number
name1 LIKE lfa1-name1, "Name 1
END OF eord_lfa1_tab.
DATA: BEGIN OF mseg_mkpf_tab OCCURS 0,
budat LIKE mkpf-budat, "Posting date in the document
mblnr LIKE mkpf-mblnr, "Number of material document
werks LIKE mseg-werks,
mjahr LIKE mseg-mjahr, "Material doc. year
menge LIKE mseg-menge, "Quantity
lgort LIKE mseg-lgort, "Storage location
bwart1 LIKE mseg-bwart, " Movement type (inventory management)
bwart2 LIKE mseg-bwart,
lifnr LIKE mseg-lifnr,
END OF mseg_mkpf_tab.
DATA: mseg_mkpf_tab1 LIKE STANDARD TABLE OF mseg_mkpf_tab WITH HEADER
LINE.
DATA: BEGIN OF mkol_tab OCCURS 0,
seinm LIKE mkol-seinm, " Restricted-use consignment stock
slabs LIKE mkol-slabs, " Unrestricted-use consignment stock
sobkz LIKE mkol-sobkz, " Special stock indicator
END OF mkol_tab.
DATA: BEGIN OF t_werks OCCURS 0,
werks LIKE t001w-werks, " plant
END OF t_werks.
**DATA: BEGIN OF mkpf_tab OCCURS 0,
budat LIKE mkpf-budat, "Posting date in the document
mblnr LIKE mkpf-mblnr, "Number of material document
END OF mkpf_tab.
DATA: BEGIN OF zresult_tab OCCURS 0,
matnr LIKE marc-matnr, " Material Number
maktx LIKE makt-maktx, "Material description
rev_lvl TYPE c, " Revision level
ebeln LIKE eord-ebeln, "Scheduling Agreement
ekgrp LIKE marc-ekgrp, " Purchasing group
dispo LIKE marc-dispo, " MRP controller
lifnr LIKE eord-lifnr, "Vendor's account number
name1 LIKE lfa1-name1, "Name 1
eislo LIKE marc-eislo, " Minimum Safety Stock
mabst LIKE marc-mabst, " Maximum stock level
eisbe LIKE marc-eisbe, " Safety stock
werks LIKE marc-werks, " Plant
bwart LIKE mseg-bwart, " Movement type (inventory management)
slabs LIKE mkol-slabs, " Unrestricted-use consignment stock
labst LIKE mard-labst, " Valuated stock with unrestricted use
speme LIKE mard-speme, " Blocked stock
umlme LIKE mard-umlme, " Stock in transfer
insme LIKE mard-insme, " Stock in quality inspection
retme LIKE mard-retme, " Blocked Stock Returns /added
seinm LIKE mkol-seinm, " Restricted-use consignment stock
sobkz LIKE mkol-sobkz, " Special stock indicator
lgort LIKE mseg-lgort, "Storage location
END OF zresult_tab.
*DATA: zresult_tab1 LIKE STANDARD TABLE OF zresult_tab WITH HEADER LINE.
DATA: BEGIN OF zresult_tab1 OCCURS 0,
matnr LIKE marc-matnr, " Material Number
maktx LIKE makt-maktx, "Material description
ebeln LIKE eord-ebeln, "Scheduling Agreement
ekgrp LIKE marc-ekgrp, " Purchasing group
dispo LIKE marc-dispo, " MRP controller
lifnr LIKE eord-lifnr, "Vendor's account number
name1 LIKE lfa1-name1, "Name 1
eislo LIKE marc-eislo, " Minimum Safety Stock
mabst LIKE marc-mabst, " Maximum stock level
eisbe LIKE marc-eisbe, " Safety stock
werks LIKE marc-werks, " Plant
bwart LIKE mseg-bwart, " Movement type (inventory management)
menge LIKE mseg-menge,
slabs LIKE mkol-slabs, " Unrestricted-use consignment stock
labst LIKE mard-labst, " Valuated stock with unrestricted use
speme LIKE mard-speme, " Blocked stock
umlme LIKE mard-umlme, " Stock in transfer
insme LIKE mard-insme, " Stock in quality inspection
lgort LIKE mard-lgort,
retme LIKE mard-retme, " Blocked Stock Returns
END OF zresult_tab1.
*DATA : begin of zresult_tab1 occurs 0,
*include zresult_tab LIKE zresult_tab.
*end of itab.
and the select statements are like this:
SELECT matnr
FROM mara
INTO TABLE zresult_tab
WHERE matnr IN s_matnr.
and werks in s_werks.
SELECT mkpfbudat mkpfmblnr
msegmblnr msegmjahr mseg~menge
mseglgort msegbwart
FROM mseg INNER JOIN mkpf
ON mkpfmblnr = msegmblnr
AND mkpfmjahr = msegmjahr
INTO CORRESPONDING FIELDS OF
TABLE mseg_mkpf_tab
WHERE
mseg~werks IN s_werks
AND lgort IN s_lgort1
AND lgort IN s_lgort2
AND bwart IN s_bwart1
AND bwart IN s_bwart2.
AND budat IN s_usgpid.
IF sy-subrc EQ 0.
special stocks from vendor/Vendor consignment stock
SELECT seinm slabs sobkz
FROM mkol
INTO CORRESPONDING FIELDS OF
TABLE mkol_tab
FOR ALL ENTRIES IN mseg_mkpf_tab
WHERE matnr IN s_matnr
AND werks = mseg_mkpf_tab-werks
AND lifnr in s_lifnr
AND sobkz = 'K'.
ENDIF.
SELECT lgort speme umlme insme retme labst
FROM mard INTO TABLE mard_tab
WHERE matnr = zresult_tab-matnr
AND werks IN s_werks
AND lgort IN s_lgort1
AND lgort IN s_lgort2.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'no data populated!!!'.
ENDIF.
SELECT matnr ebeln lifnr
FROM eord
INTO CORRESPONDING FIELDS OF
TABLE eord_lfa1_tab
WHERE matnr IN s_matnr
AND werks IN s_werks.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'fgdf'. ENDIF
SELECT matnr ebeln lifnr
FROM eord
INTO CORRESPONDING FIELDS OF
TABLE eord_lfa1_tab
WHERE lifnr IN s_lifnr
AND werks IN s_werks
IF sy-subrc NE 0.
MESSAGE i000 WITH 'No matching material found'.
ENDIF.
IF NOT p_endstk IS INITIAL.
CLEAR zresult_tab1.
LOOP AT mard_tab.
READ TABLE zresult_tab1 WITH KEY lgort = s_lgort1.
IF sy-subrc EQ 0.
COLLECT mard_tab INTO mard_tab1.
ENDIF.
MOVE mard_tab1-speme TO zresult_tab-speme.
MOVE mard_tab1-umlme TO zresult_tab-umlme.
MOVE mard_tab1-insme TO zresult_tab-insme.
MOVE mard_tab1-retme TO zresult_tab-retme.
MOVE mard_tab1-labst TO zresult_tab-labst.
APPEND zresult_tab.
ENDLOOP.
ENDIF.
IF NOT p_otrstk IS INITIAL.
CLEAR zresult_tab1.
LOOP AT mard_tab.
READ TABLE zresult_tab1 WITH KEY lgort = s_lgort1 lgort = s_lgort2
IF sy-subrc EQ 0.
COLLECT mard_tab INTO mard_tab1.
ENDIF.
MOVE mard_tab1-speme TO zresult_tab-speme.
MOVE mard_tab1-umlme TO zresult_tab-umlme.
MOVE mard_tab1-insme TO zresult_tab-insme.
MOVE mard_tab1-retme TO zresult_tab-retme.
move mard_tab1-labst to zresult_tab-labst.
APPEND zresult_tab.
ENDLOOP.
ENDIF.
IF NOT p_chk IS INITIAL.
CLEAR :mseg_mkpf_tab,mseg_mkpf_tab1.
LOOP AT zresult_tab1.
READ TABLE mseg_mkpf_tab WITH KEY bwart1 = s_bwart1
lifnr = s_lifnr budat = s_usgpid.
IF sy-subrc EQ 0.
COLLECT mseg_mkpf_tab INTO mseg_mkpf_tab1.
ENDIF.
MOVE mseg_mkpf_tab1-menge TO zresult_tab1-menge.
APPEND zresult_tab1.
ENDLOOP.
ENDIF.
and filling the zresult _tab like this:
LOOP AT zresult_tab1.
READ TABLE mseg_mkpf_tab.
IF sy-subrc EQ 0.
zresult_tab1-bwart = mseg_mkpf_tab-bwart1.
MODIFY zresult_tab1.
ENDIF.
ENDLOOP.
LOOP AT zresult_tab1.
READ TABLE mkol_tab.
IF sy-subrc EQ 0.
zresult_tab1-slabs = mkol_tab-slabs.
ENDIF.
MODIFY zresult_tab1.
ENDLOOP.
LOOP AT zresult_tab1.
READ TABLE marc_tab.
IF sy-subrc EQ 0.
zresult_tab1-eislo = marc_tab-eislo.
zresult_tab1-mabst = marc_tab-mabst.
zresult_tab1-eisbe = marc_tab-eisbe.
zresult_tab1-werks = marc_tab-werks.
zresult_tab1-ekgrp = marc_tab-ekgrp.
zresult_tab1-dispo = marc_tab-dispo.
ENDIF.
MODIFY zresult_tab1.
ENDLOOP.
LOOP AT zresult_tab1.
READ TABLE mard_tab.
IF sy-subrc EQ 0.
zresult_tab1-labst = mard_tab-labst.
zresult_tab1-lgort = mard_tab-lgort.
zresult_tab1-speme = mard_tab-speme.
zresult_tab1-umlme = mard_tab-umlme.
zresult_tab1-insme = mard_tab-insme.
ENDIF.
MODIFY zresult_tab1.
ENDLOOP.
Thanks
AlekhyaSome comments on your code ---
SELECT lgort speme umlme insme retme labst
FROM mard INTO TABLE mard_tab
WHERE matnr = zresult_tab-matnr
AND werks IN s_werks
AND lgort IN s_lgort1
AND lgort IN s_lgort2.
---> instead of using zresult_tab-matnr u should be using s_matnr...to populate the mard_tab internal table with the records for all material otherwise it would just do it for the last record of zresult_tab-matnr.
IF NOT p_endstk IS INITIAL.
CLEAR zresult_tab1.
LOOP AT mard_tab.
READ TABLE zresult_tab1 WITH KEY lgort = s_lgort1.
IF sy-subrc EQ 0.
COLLECT mard_tab INTO mard_tab1.
ENDIF.
MOVE mard_tab1-speme TO zresult_tab-speme.
MOVE mard_tab1-umlme TO zresult_tab-umlme.
MOVE mard_tab1-insme TO zresult_tab-insme.
MOVE mard_tab1-retme TO zresult_tab-retme.
MOVE mard_tab1-labst TO zresult_tab-labst.
APPEND zresult_tab.
ENDLOOP.
ENDIF.
--> I am quiet puzzled with the above code you are trying to read zresult_tab1 and appending data into zresult_tab. Also, for the read to be successful you should try and fill more key columns otherwise it would just fetch the first record.
--> Also in the final bit of code you are appending and modifying zresult_tab1 table and expecting result in zresult_tab table ?? Can you please check on the code with that respect.
Regards
Anurag
Maybe you are looking for
-
Problem with tags executing after update3 being applied
has anyone else encoutered this issue, it seems to be affecting both cfx tags and custom tags
-
"Busiest Clients" report template on Cisco Prime & Aironet 1242AG
Yesterday I was trying to schedule a "Busiest Clients" report on our Cisco Prime physical appliance (PRIME-NCS-APL-K9, v2.1.0.0.87). My goal was to monitor the busiest clients on a couple of old Aironet access-points. These APs have been installed in
-
I have some JSP code which does not compile in JDeveloper but works fine when deployed in a web server (Websphere). There is a page called main.jsp with code like: Map clientDataList = (Map) request.getAttribute("clientDataList"); <%@ include file="s
-
How do i stop the automatic load of signal express every time i plug in an USB device?
This is the most invasive thing I have experienced with NI products. The only choice you get is to select a trial offer or pay for a license you can't X out.
-
Premiere Pro CC 2014.2 Launches but ????
So premiere launches everything looks fine but then the window collapses into the toolbar and when I click on the icon I can't get it to show up. What's going on? My computer: Windows 7 Home Premium 64-bit 16 gb ram 4.0 GHZ AMD processor