SAPscript external subroutine - select not pulling data
Hi all,
I am calling an external subroutine in my SAPscript. In this subroutine, I am using a simple select statement:
* get sales order number
SELECT vbelv posnv
FROM vbfa
INTO CORRESPONDING FIELDS OF TABLE it_so
WHERE vbeln = gv_deldoc
AND posnn = gv_posnr.
The problem is no data is being pulled into it_so. I have confirmed in VBFA (through SE16N) that data exists in the system so this isn't the problem. Are there restrictions with using selects in SAPscript?
Thanks,
Edited by: pistols123 on Sep 8, 2011 9:11 PM
Hi,
Please refer below code.
In SAP Script ,SE71: call the subroutine pool program with the below sysntax.
/: PERFORM GET_DATA IN PROGRAM ZXXXX
/: USING &XXXX-MATNR&
/: CHANGING &V_YYYY&
/: CHANGING &V_YYY2&
/: ENDPERFORM
Using Parameter will be the input in the subroutine pool to fetch the data.
Changing Paramter will be the your output to pass the data into SAP Form.
now goto SE38,and create a subroutine pool program with the name ZXXXX,follow the below code.
FORM get_data TABLES tbl_in STRUCTURE itcsy
tbl_out STRUCTURE itcsy.
READ TABLE tbl_in INDEX 1.
IF sy-subrc EQ 0.
XXXX-Matnr = tbl_in-value.
"Pass it through the conversion exit CONVERSION_EXIT_ALPHA_INPUT before SELECT."
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = gv_deldoc
IMPORTING
OUTPUT = gv_deldoc
SELECT vbelv posnv
FROM vbfa
INTO (l_vbelv,l_posnv)
WHERE vbeln = gv_deldoc
AND posnn = gv_posnr.
READ TABLE tbl_out INDEX 1.
IF sy-subrc = 0.
MOVE l_vbelv TO tbl_out-value.
MODIFY tbl_out INDEX 1.
ENDIF.
READ TABLE tbl_out INDEX 2.
IF sy-subrc = 0.
MOVE l_posnv TO tbl_out-value.
MODIFY tbl_out INDEX 2.
ENDIF.
Moderator message - Welcome to SCN. But please do not ask for "rewards"
Regards,
VSNM
Endform.
Edited by: Rob Burbank on Sep 8, 2011 4:18 PM
Similar Messages
-
Hello Experts,
Can any one help me understand what am I not doing correct or what needs to be done.
My understanding is that for table FKK_INSTPLN_HEAD, 0FC_IPL_HEAD_01 is the standard extractor. However when I check in RSO2(R/3) the extractor refers to :
Table/View : DFKKIPBW_HEAD
ExtractStruct : FKKIPBW_HEAD
Which in turn is not pulling data from the installment plan header table as it should.
Kindly suggest if there an existing extractor for installment plan header table?
How to go about resolving this issue.
rgds
ImranHi,
With the help of an ABAPer :
While running the extractor in RSA3, get into the debugging mode by typing /h in the t-code box.
Analyze why ypur extractor is not picking up data from the table...
Hope you get some idea............
Regards,
Suman -
Scheduling siebel BI report not pulling data
Hi Gurus,
i have created report in Siebel with BI publisher, My report is working fine when i am running report from the icon. But when the same report running with scheduling option not pulling data in to my report. Is any other properties to set like viewmode something or user properties under integration object? If anyone have tried please provide me the steps.
Thanks in advacne,
Regards,
madhvHi ,
Please check the following :-
Is an appropriate summarization level defined?
Are fixed values stored in the definition of the summarization level?
Is the use of a summarization level necessary?
Was test mode activated in summarization level maintenance ?
Are the summarization levels in status "active" ?
Please have a detailed look into the SAP OSS Note : 67342 - CO-PA: No summarization level found which contains detials explanations and solutions for the issue ..
Kindly revert back for any further clarifications
Regards
Sarada -
How do you get iPhoto albums on to an external HD and not by date?
I really hope someone can help me with this.
I don't know if I am missing some really easy step, but I recently bought an external 100GB FireLite drive to back up all my photos and music. The problem is that when I drag the albums on to the hard drive an error message comes up after a while, this even happens if I try to drag one photo. However, if I drag the files in date format, i.e 2001, 2002, 2003 etc.. then the files are copied over. However, when I try and open these on the new drive, they come up in Preview not in iPhoto. I am wondering if anybody else has had these problems and if so, how did you manage to back up your photos on an external hard drive as the albums are shown in iPhoto and not in date format.
I'd be grateful for any advice.Hi Saint tommy,
-when you drag Albums to the hard drive you are probably running into the problem of having images in the Album that have the same file name. This happens when your camera resets it's file numbering to 1 each time you clear the card. Make sure your camera uses continuos numbering. I am not sure why that would happen dragging one photo.
-when you drag the photos in date format, the images are still in separate folders as to date of creation, so you will not have the same problem because they are in separate folders.
-When you open them up on a separate drive, they will open up in Preview because you did not copy the Entire iPhoto Library folder. If you did copy the entire iPhoto Library folder you would have to tell iPhoto where this folder is so it can open it.
When you launch iPhoto holding down the Option key this is the window you will get.
Create a new library or choose a library to open
Choose to create a new library if that is what you want to do, or choose a library to open by clicking the "choose" button.
If you click the "create library" iPhoto will open with a brand new library for you to import images to. If you click "choose" then you will get this window.
Open library
Navigate to where the library is on your computer, highlight it, then clcik the "open" button.
Now the "how to for backing up the iPhoto Library folder"
Backing up your iPhoto Library
1. Burn the iPhoto Library folder in the Finder to a CD or DVD
This method will give you a burned iPhoto Library folder that can be copied back to your computer to replace a damaged library. You can also use this method to backup an old library when you want to create a new Library to use as your current library.
insert a blank CD into your internal or external CD-RW drive and copy the iPhoto library to the CD icon on your desktop. When you drag the CD icon to the Trash/Eject button in the Dock, you are given the option to burn the CD. Click Burn and the CD is created. To burn a DVD backup of your digital images, use a DVD and a SuperDrive-equipped Mac
The easiest way to burn an iPhoto Library folder in the Finder that is larger than 4.7 gig to fit on one DVD is to burn sections of the folder.
Drag the iPhoto Library folder to the desktop
Double click the folder to open it.
Drag each Year folder to the desktop.
You should be left with the iPhoto Library folder containing all the data files, and the Year folders.
Combine whatever year folders that amount closest to a DVD burn size on one DVD. Make sure that you have burned all the Year folders, then the iPhoto Library folder with all the data files.
If you ever need to use this backup, insert the DVDs into your computer and copy the folders to the desktop. Put all the Year folders back into the iPhoto Library folder. Then put the iPhoto Library folder back into the Pictures folder.
2. Copy the ENTIRE iPhoto Library to an external drive formated for a Mac. Do not use this as your only back up as the external can also go bad.
3. Copy the ENTIRE iPhoto Library to your iPod in disk mode
4.Creating your own CDs and DVDs for viewing in iPhoto
This method is a great way to back up Albums of older photos or even your entire library if it is small enough to fit on a DVD. This method will give you a library that will mount within iPhoto in the source column to be viewed. To import any images from this library they need to be dragged into your library in the source column.
If you just want to backup the images in your library:
1) Within iPhoto select the images, albums or rolls you want to backup. Go to Share>Export and export them to a newly created folder on the desktop. Follow the directions in the next link.
Creating a CD or DVD to be viewed in Windows or by a photo processing company
Now the "how to copy the iPhoto Library to an external and have iPhoto use that library."
Copy the ENTIRE iPhoto Library folder to a Mac formatted external drive.
Launch iPhoto while holding down the Option key.
At the prompt, choose to open another library.
Navigate to the library on the external and highlight it.
Hit the "open" button
iPhoto will open the library on the external and from now on will use this library to import images too. This will now be your working library. Make sure everything is working correctly and everything is fine in the library.
You can then delete the library on the internal if you wish.
Hope this helps!
Lori -
ORA-01843: not a valid month, external table select fails on date column
Hi,
I created an external table as follows:
CREATE OR REPLACE DIRECTORY sales_feeds AS '/backup/oracle/feeds';
Directory created.
CREATE TABLE salesfeed_external_table
PROD_ID NUMBER
, CUST_ID NUMBER
, TIME_ID DATE
, CHANNEL_ID NUMBER
, PROMO_ID NUMBER
, QUANTITY_SOLD NUMBER(10,2)
, AMOUNT_SOLD NUMBER(10,2)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY sales_feeds
ACCESS PARAMETERS
RECORDS DELIMITED BY newline
FIELDS TERMINATED BY ','
LOCATION ('salesfeed.dat')
REJECT LIMIT 0
Table created.I then create that external flat file salesfeed.dat as folows
set echo off
set feedback off
set linesize 100
set pagesize 0
set head off
set sqlprompt ''
set trimspool on
spool on
spool /backup/oracle/feeds/salesfeed.dat
select PROD_ID||','||CUST_ID||','||TIME_ID||','||CHANNEL_ID||','||PROMO_ID||','||QUANTITY_SOLD||','||AMOUNT_SOLD
FROM salesfeed where rownum = 1;
spool off
exit
cat salesfeed.dat
18,3131,21/03/1998 00:00:00,3,999,1,2600.76Note only one row at the moment (diagonising)
Try to read it
select * from salesfeed_external_table
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEFETCH callout
ORA-30653: reject limit reachedThe log shows:
cat SALESFEED_EXTERNAL_TABLE_1302.log
LOG file opened at 11/24/11 12:16:02
Field Definitions for table SALESFEED_EXTERNAL_TABLE
Record format DELIMITED BY NEWLINE
Data in file has same endianness as the platform
Rows with all null fields are accepted
Fields in Data Source:
PROD_ID CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
CUST_ID CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
TIME_ID CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
CHANNEL_ID CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
PROMO_ID CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
QUANTITY_SOLD CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
AMOUNT_SOLD CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader
error processing column TIME_ID in row 1 for datafile /backup/oracle/feeds/salesfeed.dat
ORA-01843: not a valid monthI checked my nls date format etc:
select * from nls_session_parameters;
PARAMETER VALUE
NLS_LANGUAGE ENGLISH
NLS_TERRITORY UNITED KINGDOM
NLS_CURRENCY £
NLS_ISO_CURRENCY UNITED KINGDOM
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/YYYY HH24:MI:SS
NLS_DATE_LANGUAGE ENGLISH
NLS_SORT BINARY
NLS_TIME_FORMAT HH24.MI.SSXFF
NLS_TIMESTAMP_FORMAT DD-MON-RR HH24.MI.SSXFF
NLS_TIME_TZ_FORMAT HH24.MI.SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH24.MI.SSXFF TZR
NLS_DUAL_CURRENCY ¤
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSEAny ideas?
Thanks,
Mich
Edited by: Mich Talebzadeh on 24-Nov-2011 04:19Thanks
The following now works
CREATE TABLE salesfeed_external_table
PROD_ID NUMBER
, CUST_ID NUMBER
, TIME_ID DATE
, CHANNEL_ID NUMBER
, PROMO_ID NUMBER
, QUANTITY_SOLD NUMBER(10,2)
, AMOUNT_SOLD NUMBER(10,2)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY sales_feeds
ACCESS PARAMETERS
RECORDS DELIMITED BY newline
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
( PROD_ID
, CUST_ID
, TIME_ID DATE 'dd/mm/yyyy HH24:MI:SS'
, CHANNEL_ID
, PROMO_ID
, QUANTITY_SOLD
, AMOUNT_SOLD
LOCATION ('salesfeed.dat')
REJECT LIMIT 0
select * from salesfeed_external_table;
PROD_ID CUST_ID TIME_ID CHANNEL_ID PROMO_ID QUANTITY_SOLD AMOUNT_SOLD
18 3131 21/03/1998 00:00:00 3 999 1 2600.76Regards,
Mich -
Multi provider not pulling data
Hi All,
I have 2 data targets ,1 is 0PA_C01 cube and 2nd is a custom DSO.i created a multi provider on top of them and made the identification process properly for chars and keyfigs.in my case 0HRPOSITION is the common char between the two data targets.when i see for the data in listcube transaction it is showing only data related to the cube it is not showing DSO related data.
In the list cube transaction info provider column is showing only 0PA_C01.
Please suggest me if i am missing something.
Thanks
SriThanks Mr M & Singh
both of your suggestions are valid but no use in my case,0hrposition is having data in both data targets.if i copy 1 position value into another data targets it is showing values,it means there is a problem at multi provider level.
**the multi provider not at all pulling the second data target values ,i tested with some other data targets in all the cases values for only one data target are coming.
i am in BI 7.0 SP20.
can someone suggest more inputs?
Thnaks
Sri
Edited by: super trooper on Feb 13, 2009 11:45 AM -
MSS PCR form not pulling data for a user
Hi All,
On Organizational/Position Change Form(on Portal) one of the user don't see the data in the dropdowns in this form.
But for other users it is working just fine. The user not able to see the data in drop down can access other PCR's.
I was wondering if there is a way we can test the form for the same user in the backend. If we can test him in the backend and the values are being populated for this user then there is a Portal problem.
Can you please tell me how can we test this form for this user in the backend.
Thanks in Advance,
Joehi ,
You can put external breakpoint in the BADI method and try debugging it by opening adobe form from
portal.
thanks ,
sahiba -
Infospke not pulling data from the cube
Hi,
Though there is data in the cube ,when I say start extraction the infospoke is pulling zero records .But I see a file created but I am not able to see the data.In the monitor it says 0 record extracted.
I have done this first time in the new upgrade system where I changed the server name.
ThanksHi,
Check out the layout definition(Data column) for the corresponding planning level and also you can check the <b>planning area</b> value whether it corresponds to your cube name ..
Also make a cross check with the <b>listcube</b> for your corresponding restriction which you have made in planning level..
Regards,
Siva. -
Hello All,
I have a question regarding select statement.
Here is the select code
SELECT belnr
perio
wkgbtr
wogbtr
objnr
gjahr
wrttp
vrgng
parob
parob1
uspob
bukrs
owaer
FROM coep
INTO CORRESPONDING FIELDS OF TABLE gt_coep_recv
WHERE perio IN s_perio
AND gjahr IN s_gjahr
AND bukrs IN s_bukrs
AND kstar LIKE '001124%'
AND objnr LIKE 'LKIRST%'
AND parob LIKE 'LKIRSTP%STCC%'
AND wrttp = '11'
AND vrgng = 'RKL'.
This select return a sy-subrc value of 4 when executed. But when I go the COEP table and try to select data basing on the same conditions, I am able to retrieve data.
Any idea why?
Thanks,
AmyHI,
its difficult to suggest some thing in this scenerio but.. one advice try commenting the like part and see if it is working if it works try adding like for one field at a time and check ..
SELECT belnr
perio
wkgbtr
wogbtr
objnr
gjahr
wrttp
vrgng
parob
parob1
uspob
bukrs
owaer
FROM coep
INTO CORRESPONDING FIELDS OF TABLE gt_coep_recv
WHERE perio IN s_perio
AND gjahr IN s_gjahr
AND bukrs IN s_bukrs
AND kstar LIKE '001124%'
AND objnr LIKE 'LKIRST%'
<b>AND parob LIKE 'LKIRSTP%STCC%' " I doubt this is the problem</b>
AND wrttp = '11'
AND vrgng = 'RKL'.
Thanks
mahesh -
Form Server Submit Form QPAC - Not pulling data
Hello everyone,
I wanted to see if anyone has encountered problems using the above QPAC.
My situation is as follows
1) User sends PDF back. PDF is sent back to workflow as a PDF (not XDP)
2) Form Server Submit Form is setup to extract the data from the form and put it in a document variable
However, that is not happening. I do know that the document is not broken when it is received from the Email Receiver QPAC (I've used the Avoka Document Extract QPAC to test the form itself) however for whatever reason, the variable is still empty after it is processed.
Any thoughts are appreciated!
Thanks,
RobHi Nico
Some background. When Adobe first launched LiveCycle, the first capabilities they needed to expose was encapsulated as Forms Server, and it provided:
1. Rendering a form. This would take a PDF or XDP file, plus some xml data, merge them together, and produce a PDF file.
2. Handling a form submission. This would take the data from an http request coming from a Submit button on a form, process it, and extract the XML data.
The Forms "Submit" QPAC is basically the submission API encapsulated as a QPAC. If you want to know exactly what it does, the best place to look is the LiveCycle Forms documentation.
So, to your question:
If a document variable contains a PDF form, you can use the Form Submit QPAC to extract the XML data.
A form variable is really just the XML data for a form, plus a reference to the PDF or XDP file that should be used for displaying the data - so if you assign the extracted XML to the appropriate node in the form variable, it should work.
I hope this long ramble is helpful.
Howard
http://www.avoka.com -
Select-options as a external subroutine
hi all,
plz solve my problem.
this is my first program.
tables vbak.
select-options x for vbak-vbeln.
types : beginf of ty,
a tupe vbak-vbeln,
b type vbak-ernam,
end of ty.
data : itab type table of ty,
wa type ty.
perform sub(znava) using x.
this is my secomd program
report znava.
form sub using x.
select vbeln ernam from vbak into table itab where vbeln in x.
loop at itab into wa.
write :/ wa-a,wa-b.
endloop.
endform.
in the above two programs are separate,and i am using external subroutine but it will show some error how can i rectify.
anyone plz guide me.
thanks and regards,
navneeth.
Edited by: Navaneetha KRISHNAN on Feb 19, 2008 5:50 PMFirst of all SELECT-OPTIONS are TABLE type.
You just can't use USING keyword, you've to use TABLES keyword.
second point is,, in your second program are you defining ITAB and WA??? otherwise second program is not going to identify ITAB & WA... so I suggest you try like this..
"program 1.
TABLES vbak.
SELECT-OPTIONS x FOR vbak-vbeln.
PERFORM sub(znava) TABLES x .
"program 2
TYPES : BEGIN OF ty,
a TYPE vbak-vbeln,
b TYPE vbak-ernam,
END OF ty.
DATA : itab TYPE TABLE OF ty,
wa TYPE ty.
FORM sub TABLES x.
SELECT vbeln ernam FROM vbak INTO TABLE itab WHERE vbeln IN x.
LOOP AT itab INTO wa.
WRITE :/ wa-a,wa-b.
ENDLOOP.
ENDFORM. "sub -
External subroutine in sapscript
hi all
can anyone explain me how to handle an external subroutine in a script with a simple example.
rg
sandeepHi Sandeep,
Try this :
Use PERFORM from SAPSCRIPT
/: PERFORM BIN_LOCATION IN PROGRAM Z_SAPSCRIPT_PERFORMS
/: USING &RESBD-MATNR&
/: USING &CAUFVD-IWERK&
/: USING &RESBD-LGORT&
/: CHANGING &MARD-LGPBE&
/: ENDPERFORM
REPORT z_sapscript_performs.
SUBROUTINES FOR CALLING FROM SAPSCRIPTS
FORM bin_location TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
get default bin location from MARD for this material/plant/storage *
location
DATA: l_matnr TYPE matnr, "material
l_werks TYPE werks, "plant
l_lgort TYPE lgort, "storage location
l_lgpbe TYPE lgpbe. "bin location
Get first parameter in input table.
READ TABLE in_tab INDEX 1.
WRITE in_tab-value TO l_matnr .
Get second parameter in input table
READ TABLE in_tab INDEX 2.
MOVE in_tab-value TO l_werks.
Get third parameter in input table
READ TABLE in_tab INDEX 3.
MOVE in_tab-value TO l_lgort.
read bin location
SELECT SINGLE lgpbe INTO l_lgpbe FROM mard
WHERE matnr = l_matnr
AND werks = l_werks
AND lgort = l_lgort.
IF l_LGPBE IS INITIAL.
l_LGPBE = 'NONE'.
ENDIF.
read & update only parameter in output table
READ TABLE out_tab INDEX 1.
out_tab-value = l_lgpbe.
MODIFY out_tab INDEX 1.
ENDFORM.
Regards,
Lanka -
How can I restore my data from iCal? I didn't make any backup, but I use time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.
So what is your question?
If you forgot your encryption password:
Warning: Make sure it's a password you will remember or write it down for safekeeping. If you encrypt an iPhone backup in iTunes and forget your password, you can't restore from backup and your data will be unrecoverable.
If you can't remember the password and want to start again, you must perform a full software restore and chooseset up as a new device when iTunes prompts you to select the backup from which to restore.
The above comes from here:
http://support.apple.com/kb/HT4946 -
Report is not pulling the data from multiprovider in BI 7.0
Hi BW gurus,
We have upgraded our BW systems from 3.5 to BI 7.0.
According to our requirement we did some modifications(added some new cubes) to existing multiprovider. All the objects and assignments looks good in the multiprovider.
We are facing a problem while executing the reports, report is not pulling any data from the particular multiprovider but I can see the data from the multiprovider.
For any selection creteria we are getting the msg like "No applicable data found".
Created a sample query with only two chars and two KF's no conditions, no exceptions still the report is not populating any data for any selection creteria.
Appreaciate for your help in this regard.
-BKHi
Deactivate the aggregates and then rebuild the indexes and then activate the aggregates again.
GTR -
1099 Misc- RFIDYWWT program not selecting by clearing date
Hello,
I am trying to run the transaction S_P00_07000134 - Generic Withholding Tax Reporting for 1099 Misc forms in ECC6.0. It is not pulling the vendor line items by the clearing date like the old 4.6 1099 program did (RFW1099M). For example, an item was posted in 2007 and paid in 2008. This is not getting picked up in the RFIDYWWT program. Am I missing something? I've selected Document clearing date under the output control and lists, but I don't think that's the right spot for data selection.
Any help would be appreciated!
-LoriThanks Carol! That is exactly it. I did resort to putting in an OSS message - and that's what they told me after she "yelled" at me for asking the question...it wasn't a software issue, but remote consulting. I'd like to see where in the SAP help it tells you that if you're not familiar with the program!
Thanks again,
-Lori
Maybe you are looking for
-
Error while deriving the currencyfrom table T001P for International payrol
Dear Experts, when i run the payroll in simulation mode. im geting an error msg as ' error while deriving the currency from table T001P' I have checked all PA assignement with compnay code and country grouping (molga =99), which is correct and also i
-
MRP creating cancel notices for min max purchased items
We use min max planning for many repetitive purchased items. These same items are also set to MPS/DRP Planned as well. This is only so we can use the Planned Order report to identify material shortages to flow schedules. However, MRP exceptions is re
-
Invoice Split due to different VAT Registration nos.
Hi all, I have a problem where a sales order and delivery is created but Invoice is getting split into 2 invoices which is Unwanted. There are 4 items in the order - the 1st invoice contains the first 2 items and 2nd invoice contains last 2 items. Th
-
"We could Not Complete Your Request" Error
Got an email yesterday saying that i'd failed to reset my Apple password even though i havent tried so i was a little concerned, I've tried to connect to my account, I can see the iTunes store fine and download free podcasts that dont require a log i
-
Do not respect security environnement and load images
With Firefox 4. When loading into a securised website/environnement, that identify and blocks certain images as web bugs, then firefox 4 displays them. Other browsers respect the restriction of the environnement. Related to the question: problem when