WMIC - different output on English (non-localized) and non-English (localized) OS language
Hi, I have strange behavior when running WMIC script to get serial numbers of storage devices across network:
wmic /node:"w10","w16" /failfast:on diskdrive get model,serialnumber,description /format:list
and get different results:
C:\>wmic /node:"w10","w16" /failfast:on diskdrive get model,serialnumber,description /format:list
Description=Дисковый накопитель
Model=KINGSTON SV300S37A120G ATA Device - drive the same
SerialNumber=303532304236323741333830383143[HIDEBYME] <<< Russian language OS
Description=Disk drive
Model=KINGSTON SV300S37A120G - drive the same
SerialNumber=50026B[HIDEBYME] <<< English language OS
I check many of them, and it's for sure, that SerialNumber output depends of OS language.
If system are English, than we have SN, when not, we have something that 40 char lenght.
Maybe someone know, how to fix it? Thanks.
as is
WMIC is not a script. It is as ystemutility. You should post in the forum for your OS.
Language settings can affect everything. If a device is not designed t osupport languages then it may not report correctly. We cannot fix this in a script as it usually requiers low-level API calls.
If you use PowerShell you could change langauge to English when accessing that device.
¯\_(ツ)_/¯
Similar Messages
-
Servlet is giving different output on JBuilder 2005(IDE) and on browser
Hi all
I am using JBuilder2005 for devloping servlets.
While I am executing the code on JBuilder itself..it's working out fine..
But when I am trying to use browser for calling a servlet...I am getting Different output..
Can Anyone tell me why is so..and where I have to make changes so that I can do the same from browser also
Thx
VijayWhat do u mean on JBuilder? The browser built-in to JBuilder? What are the different outputs?
-
Different output running Report on server and running local
hi all
I have the following problem, running my report on development environment i have the desidered results, but running the same report with the same parameters on Web server side, I have no results.
Could you help me???
Thanks in advance
AntonioHi
Yes other reports work without these problems...
I think that the problem is the report parameter form, and the parameter report definition.... I think so, because, if I set the report execution parameter "paramform" to no, giving the same input execution values it functs as local, but if I set it to yes it doesn't work.
I'm trying to cancel report parameter form on the report and remake it, I'll let you know.
Thanks in advance
Antonio -
Cfchart shows different output in 7.0.2 and 6.1
We had a upgrade of CF MX server from 6.1 to 7.0.2 recently
in an AIX platform. After the upgrade, CFCHART output is different
than the one from the previous version. Please see the code below.
BAR chart is shown as lines in new version that too with different
colors.
<html>
<body>
<cfchart Format="flash"
chartHeight="250"
chartWidth="400"
showXGridlines = "no"
showYGridlines = "yes"
gridlines="5"
xOffset="0"
yOffset="0"
dataBackgroundColor= "##CECFFF" showborder="no"
font="Arial"
fontsize="12" fontbold="no" fontitalic="no"
labelFormat = "currency"
show3D="yes" rotated="no" sortxaxis="no"
showlegend="no"
showmarkers="no"
backgroundColor = "##CECFFF">
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Jun" value="100">
</cfchartseries>
</cfchart>
<br>
<cfchart Format="flash"
chartHeight="250"
chartWidth="400"
showXGridlines = "no"
showYGridlines = "yes"
gridlines="5"
xOffset="0"
yOffset="0"
dataBackgroundColor= "##CECFFF" showborder="no"
font="Arial"
fontsize="12" fontbold="no" fontitalic="no"
labelFormat = "currency"
show3D="yes" rotated="no" sortxaxis="no"
showlegend="no"
showmarkers="no"
backgroundColor = "##CECFFF">
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 May" value="90">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Jun" value="70">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Jul" value="85">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 aug" value="100">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Sep" value="90">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Oct" value="70">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Nov" value="85">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2005 Dec" value="100">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2006 Jan" value="90">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2006 Feb" value="70">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2006 Mar" value="85">
</cfchartseries>
<cfchartseries type="bar" paintstyle="raise"
markerstyle="rectangle">
<cfchartdata item="2006 Apr" value="100">
</cfchartseries>
</cfchart>
</body>
</html>anchalgupta181988 wrote:
Is it possible to switch from iOS 7.0.2 to 6.1.3.
Sorry... No... Downgrading is not supported by Apple.
anchalgupta181988 wrote:
Since I have updated my IPhone 4 iOS 6.1.3 to 7.0.2, my iPhone has started to hang and the processing has become slow.
Try This...
Close All Open Apps... Sign Out of Your Account... Perform a Reset... Try again...
Reset ( No Data will be Lost )
Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
http://support.apple.com/kb/ht1430
If no joy...
Reset all settings
Settings > General > Reset > Reset all Settings.
This will return all iDevice settings to factory defaults... you will not lose any data.... But you will have to re-enter all of the device settings.
If the issue persists...
Connect to iTunes on the computer you usually Sync with and Restore
http://support.apple.com/kb/HT1414
Make sure you have the Latest Version of iTunes (v11) Installed on your computer
iTunes free download from www.itunes.com/download
Some Other Tips Here...
http://osxdaily.com/2013/09/23/ios-7-slow-speed-it-up/
http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/ -
Cd c:\java gives me different output and javac doesnt work
Dear friends;
once I type cd c:\java it gives me different output and after that javac doesn't work
Like
javac filename.java
doesnt compile.
Any comments, please.
C:\Program Files>java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
C:\Program Files>That error means that the file does not exist or you got the filename wrong (which means it does not exist)...
recheck the location of your file and verify that it actually there...
Step 2, now that we know that the J2SDK1.4.2_03 is installed in C:\j2sdk1.4.2_03\bin...
We can now set you path... If you have an Windows 2000 or XP then check this link in the forum...
http://forum.java.sun.com/thread.jsp?forum=54&thread=491703&tstart=0&trange=15
So what you do is right click on My Computer (icon) which will give you a menu...
Select Properties at which point you will see the System Properties Dialog window...
Select the Advanced Tab (called Details in Win2000) Click on the Environment Variables button...
Which will open the Environment Variable Dialog window... then in the second little window labeled System Variables, select Path and click on the edit button...
you will now see the Edit System Variable dialog window...
in Variable Value goto the the end of that line (make sure that nothing is selected/highlighted), type
";c:\j2sdk1.4.2_3\bin
make sure that you include the semicolon...
click ok to make the change, and via the ok buttons exit System Properties...
reopen DOS and now you should be able to run Javac.exe anywhere...
Hope this helps...
-MaxxDmg...
-' He who never sleeps...' -
Different Output of the template from Template Builder and Oracle Apps.
Hi,
I have created a template with a page layout of 11" X 17" this template has around 18 columns.
When i load the XML data and run it from XML Template builder 5.6.2 the output is fine but when I run it through oracle applications i get different output basically the output from oracle applications comes in 7 pages (First page has half page output , 2 nd page has 3/4th page output.....) where as from XML template builder the output comes in 6 Full pages.
Wher am i going wrong.
Thanks in Advance.The output is in PDF format.
-
Acrobat DC and XI different Output preview; same setting on the same machine
Hello,
I've got an question regarding Output preview
My sample PDF does have different output preview values on Acrobat DC (100% Black) and Acrobat XI (CMYK values)
Both use the same setting (Euroscale Coated v2), doc has no PDF/X output intent
Still..... it's strange that on one Mac the PDF does look different....
What's going wrong?
Kind regardsNumerous fixes went into color display on MacOS for Acrobat DC as well as in Output Preview in general. That having been said, I don't recall any changes that would have resulted in the phenomena you are seeing.
I assume you were clicking on the “black” circle to get you sample color values? And what do you believe should be the correct values? CMYK=(0,0,0,1) or CMYK=(0.8,0.64,0.67,0.75)?
If you can post a copy of this file, we can examine it to see what is going on.
- Dov -
I am using the Producer drummers in Logic where the different drums parts,(snare, overheads, Kick, etc) are broken into separate tracks. I would like to take some of these tracks (for ex. snare) and route it to a different output bus. When I try to do this the output is not modifiable. Anyone find a way around this?
The question is not to find a way around it, the question is why it behaves that way in your Project.
A Producer Kit is just a Summing Stack, were all the individual Channel Strips (Subtracks) are routed to the same Bus that the Master Stack Channel Strip uses as its input.
In the example of the screenshot, the Summing Stack uses Bus 2, but I selected different Outputs for the firstsix Subtracks, even a Surround Output, whatever is available under the Output Selection Button. Only the "Tom High" Channel Strip is still routed via Bus 2 to the Master Stack Channel Strip.
You can find more in-depth explanations about the Drummer in my graphically enhanced manual "Logic Pro X - How it Works".
Try to use a different Project and see if you can change the output routing there.
Hope that helps
Edgar Rothermich
http://DingDingMusic.com/Manuals/
'I may receive some form of compensation, financial or otherwise, from my recommendation or link.' -
Hi ,
We have a catalog that defines 2 types of products (they have too many different properties), so wanted to keep them on two different MDEX engines and serve the applications requests. Here DB catalog and front end ATG application is same for both the MDEX instances.
Is it possible to have 2 different output config XML files and index the data into 2 endeca apps using the same indexing component ProductCatalogSimpleIndexingAdmin?
Thanks
DevHi, also have had some problem some monthes ago - I created separete component ProductCatalogSimpleIndexingAdminSecond. After that one of my colleage gave me some advice:
The creating separate component like ProductCatalogSimpleIndexingAdmin for the second IOC is possible way for resolving your situation. But I afraid that this way will be required creating mane duplicates for already existed components.
In my opinion the better way is the following:
starting from AssemblerApplicationConfiguration and ApplicationConfiguration component. It contains details for connecting between ATG and Endeca. Of course you should configure different components for different Endeca Apps.
After that:
Find all components that uses AssemblerApplicationConfiguration and ApplicationConfiguration. Customize these components for using one or another *Configuration component depending on what index works. (many variants released it: the most simple global custom component with flag.)
Then customize the existed ProductCatalogSimpleIndexingAdmin. Using one or another IOC and setting the flag in global custom component when index started. You can add some methods into your custom ProductCatalogSimpleIndexingAdmin like:
Execute baseline index for both IOC (one by one)
Execute baseline for IOC 1
Execute baseline for IOC 2.
Note: you should be afraid about incremental (partial) index in this configuration. But resolving conflicts in incremental index should be done after full implementation these changes.
Regards -
Same report, 2 identical servers, 2 different outputs???
We have a report that is produced correctly on our Staging server, but when we promote the same report to our Production server (which is a mirror of our Staging server), we get different output. The machines are identical in every respect except for the name. The same queues, fonts, and version of Crystal Report (10.2.3600.0) is installed on both. I wish I could upload the 2 versions of the pdfs that are outputted for you to see the differences, but there doesn't seem to be a way to do that here. Any ideas of what could be causing the discrepancies?
Hi Amanda,
Can I back track a bit here? I would like a bit more clarification on how this is being tested. From what I understand:
1) You have the same application running on 2 different servers which are mirrors of each other.
2) The report is exported to PDF directly, not previewed or printed first.
3) The PDF is opened locally on the client machine.
A couple of questions I have:
1) Is the client machine viewing the PDFs from both servers or are these 2 different clients as well? If the clients are different, then can you try opening the PDF from the second server onto your original client and see if they formatting is the same? I say this because I want to make sure the Acrobat reader is the same version on both machines and to eliminate the possibility that the PDF is fine but the reader may be the culprit.
2) You've removed the printer in the report I see. On the client machine, is there default printer installed and is it something other than the Generic Text Driver?
3) Same question as above but on the second server? A printer is important to Crystal even if you are not printing. Many years ago if a printer was not installed, the print engine would crash the report when you tried to run it. That's when the No Printer option was added but that's a different story. I just needed to stress the importance of having a printer installed.
Thanks,
Brian -
Smartform Different output formats in same language
Hello
I have a Bulgarian smartform which is translated via SE63 into English.We have a customizing table and according to some fields from there,the customer wants to have the english smartform to have slightly different outputs, no big differences,but for ex some bigger/smaller characters or some fields that should not be displayed.
How can i do this,because the only way to control this is via se63 that has no such option?
Thank youLook at SE63 translation screen, some constants texts are represented like <F1>пример</ > where <F1> is the character format, so translate it to <F2>example</ > and the text will be printed with another character format.
But it may be easier to check the language code in the Smartforms itself, especially for text that are not to be printed, (if you don't wont to translate text to initial value) or for full variable text (text item without any constant) that don't appear in the translation screen.
Regards,
Raymond -
ALV output converted into PDF format and send that PDF to user through mail
Hi Experts,
I have report earlier its output was in alv grid.
Now i want that ALV output converted into PDF format.And that PDF output send to user through mail.
Can u please tell how to do?
My code is here(output is displaying in ALV grid).
INCLUDE <icon>.
TYPE-POOLS: slis, kkblo.
TABLES : zmsd_freight_hdr, zmsd_freight_det, zmsd_blinfo, zmsd_diheader.
TABLES : lfa1.
DATA : t_hdr LIKE zmsd_freight_hdr OCCURS 0 WITH HEADER LINE,
T_DET LIKE ZMSD_FREIGHT_DET OCCURS 0 WITH HEADER LINE,
t_bl LIKE zmsd_blinfo OCCURS 0 WITH HEADER LINE,
t_di LIKE zmsd_diheader OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_det OCCURS 0.
INCLUDE STRUCTURE zmsd_freight_det.
DATA type(30).
DATA: END OF t_det.
DATA: v_target2(30),
v_zsammg LIKE t_det-zsammg,
v_gsttotal LIKE t_det-zamount.
DATA : BEGIN OF t_data OCCURS 0,
zsammg LIKE zmsd_freight_hdr-zsammg,
zdidbl LIKE zmsd_freight_hdr-zdidbl,
zvkorg LIKE zmsd_freight_hdr-zvkorg,
zinvno LIKE zmsd_freight_hdr-zinvno,
zttlamt LIKE zmsd_freight_hdr-zttlamt,
zstatus LIKE zmsd_freight_hdr-zstatus,
ztype LIKE zmsd_freight_hdr-ztype,
zconfirm LIKE zmsd_freight_hdr-zconfirm,
zconfirmdate LIKE zmsd_freight_hdr-zconfirmdate,
erdat LIKE zmsd_freight_hdr-erdat,
ernam LIKE zmsd_freight_hdr-ernam,
erzet LIKE zmsd_freight_hdr-erzet,
aedat(10),
aenam LIKE zmsd_freight_hdr-aenam,
aezet LIKE zmsd_freight_hdr-aezet,
zline LIKE zmsd_freight_det-zline,
zfptype LIKE zmsd_freight_det-zfptype,
zchrcode LIKE zmsd_freight_det-zchrcode,
zcurcode LIKE zmsd_freight_det-zcurcode,
zqty LIKE zmsd_freight_det-zqty,
zuom LIKE zmsd_freight_det-zuom,
zrate LIKE zmsd_freight_det-zrate,
zamount LIKE zmsd_freight_det-zamount,
zexrate LIKE zmsd_freight_det-zexrate,
zccode LIKE zmsd_blinfo-zccode, "MADK991565
zccode like ZMSD_FREIGHT_HDR-zfcode, "MADK991565
zbldate(10),
zbl LIKE zmsd_blinfo-zbl,
type(3),
waerk LIKE zmsd_freight_det-zcurcode,
zamountl LIKE zmsd_freight_det-zamount,
END OF t_data.
DATA : w_layout TYPE slis_layout_alv,
w_catalog TYPE slis_fieldcat_alv,
t_catalog TYPE slis_t_fieldcat_alv,
w_sort TYPE slis_sortinfo_alv,
t_sort TYPE slis_t_sortinfo_alv.
DATA V_ZINVNO like T_HDR-ZINVNO. "MADK991565
DATA : v_count TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK a0 WITH FRAME TITLE text-001.
PARAMETERS : p_zvkorg LIKE zmsd_freight_hdr-zvkorg OBLIGATORY .
SELECT-OPTIONS : s_zdidbl FOR zmsd_freight_hdr-zdidbl ,
s_zccode FOR lfa1-lifnr ,
s_status FOR zmsd_freight_hdr-zstatus ,
s_ztype FOR zmsd_freight_hdr-ztype ,
s_erdat FOR zmsd_freight_hdr-erdat ,
s_ernam FOR zmsd_freight_hdr-ernam ,
s_zconfd FOR zmsd_freight_hdr-zconfirmdate .
PARAMETERS : p_zconf AS CHECKBOX .
SELECTION-SCREEN END OF BLOCK a0.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-002.
PARAMETERS : p_hdr RADIOBUTTON GROUP rad DEFAULT 'X' ,
p_det RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK a1.
INITIALIZATION.
AT SELECTION-SCREEN.
START-OF-SELECTION.
PERFORM get_data.
PERFORM process.
PERFORM display.
END-OF-SELECTION.
PERFORM fm_get_num_pages.
AT USER-COMMAND.
AT LINE-SELECTION.
TOP-OF-PAGE.
PERFORM fm_top_of_page USING '7010' sy-title space.
FORM get_data.
SELECT *
FROM zmsd_freight_hdr
INTO TABLE t_hdr
WHERE zvkorg EQ p_zvkorg
AND zdidbl IN s_zdidbl
AND zstatus IN s_status
AND ztype IN s_ztype
AND erdat IN s_erdat
AND ernam IN s_ernam
AND zconfirmdate IN s_zconfd
AND ZFCODE IN S_ZCCODE. "MADK991565
IF p_zconf = 'X'.
DELETE t_hdr WHERE zconfirm NE 'C'.
ENDIF.
CHECK NOT t_hdr[] IS INITIAL.
SELECT *
FROM zmsd_blinfo
INTO TABLE t_bl
FOR ALL ENTRIES IN t_hdr
WHERE zsammg = t_hdr-zsammg.
SORT t_bl BY zsammg.
SELECT *
FROM zmsd_diheader
INTO TABLE t_di
FOR ALL ENTRIES IN t_hdr
WHERE zsammg = t_hdr-zsammg.
SORT t_di BY zsammg.
IF P_DET = 'X'. "MADK933361
SELECT *
FROM zmsd_freight_det
INTO TABLE t_det
FOR ALL ENTRIES IN t_hdr
WHERE zsammg = t_hdr-zsammg
AND ZINVNO = T_HDR-ZINVNO . "MADK991565
SORT t_det BY zsammg zline. "MADK991565
SORT T_DET BY ZSAMMG ZINVNO ZLINE. "MADK991565
ENDIF. "MADK933361
ENDFORM.
FORM process.
REFRESH t_data.
CLEAR v_gsttotal. "MADK933361
LOOP AT t_hdr.
Start of MADK933361
CLEAR: v_target2.
v_zsammg = t_hdr-zsammg.
V_ZINVNO = T_HDR-ZINVNO. "MADK991565
AT NEW zsammg. "MADK991565
AT NEW ZINVNO. "MADK991565
PERFORM get_gst_value.
ENDAT.
End of MADK933361
PERFORM move_header.
CHECK t_data-zccode IN s_zccode.
IF p_det = 'X'.
CSF Project Changes Starts DEV34 MADK985782
LOOP AT T_DET WHERE ZSAMMG = T_HDR-ZSAMMG..
LOOP AT t_det WHERE zsammg = t_hdr-zsammg AND
zinvno = t_hdr-zinvno.
CSF Project Changes Ends DEV34 MADK985782
PERFORM move_header.
CHECK t_data-zccode IN s_zccode.
MOVE-CORRESPONDING t_det TO t_data.
t_data-zamountl = t_data-zamount * t_data-zexrate.
APPEND t_data.
CLEAR t_data.
ENDLOOP.
ELSE.
APPEND t_data.
CLEAR t_data.
ENDIF.
AT END OF zsammg.
CLEAR v_gsttotal.
ENDAT.
*Start of changes for IS090901289-PIA MADK991565
AT END OF ZINVNO.
CLEAR V_GSTTOTAL.
ENDAT.
*End of changes for IS090901289-PIA MADK991565
ENDLOOP.
ENDFORM.
FORM move_header.
MOVE-CORRESPONDING t_hdr TO t_data.
t_data-zttlamt = t_data-zttlamt + v_gsttotal. "MADK933361
t_data-waerk = 'SGD'.
IF NOT t_hdr-aedat IS INITIAL.
WRITE: t_hdr-aedat TO t_data-aedat.
ELSE.
CLEAR : t_data-aedat.
ENDIF.
READ TABLE t_bl WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
IF sy-subrc EQ 0.
t_data-zccode = t_bl-zccode. "MADK991565
T_DATA-ZCCODE = T_HDR-ZFCODE. "MADK991565
IF NOT t_bl-zbldate IS INITIAL.
WRITE: t_bl-zbldate TO t_data-zbldate.
ENDIF.
t_data-zbl = t_bl-zbl.
t_data-type = 'DBL'.
ELSE.
READ TABLE t_di WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
IF sy-subrc EQ 0.
t_data-zccode = t_di-zdiforcode. "MADK991565
T_DATA-ZCCODE = T_HDR-ZFCODE. "MADK991565
t_data-type = 'DI'.
ENDIF.
ENDIF.
ENDFORM.
FORM display.
IF t_data[] IS INITIAL.
MESSAGE s398(00) WITH 'No Data Selected'.
EXIT.
ENDIF.
DATA : l_repid LIKE sy-repid.
l_repid = sy-repid.
REFRESH t_catalog.
CLEAR t_catalog.
w_layout-cell_merge = 'X'.
PERFORM map_fields.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_user_command = 'ALV_USER_COMMAND'
is_layout = w_layout
it_fieldcat = t_catalog[]
i_grid_title = sy-title
i_save = 'A'
it_sort = t_sort[]
TABLES
t_outtab = t_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM map_fields.
Sort Order
CLEAR v_count.
PERFORM sf USING 'ZDIDBL' 'X' 'X'.
Fields to be displayed
CLEAR v_count.
IF p_hdr = 'X'.
PERFORM af USING :
DESCRIPTION FIELD LEN RTABLE RFIELD
'DI/DBL ' 'ZDIDBL' '14' ' ' ' ',
'Type ' 'TYPE' '04' ' ' ' ',
'Forwarder Code ' 'ZCCODE' '14' ' ' ' ',
'BL Number ' 'ZBL' '14' ' ' ' ',
'BL Date ' 'ZBLDATE' '10' ' ' ' ',
'Invoice Number ' 'ZINVNO' '15' ' ' ' ',
'Extraction ' 'ZSTATUS' '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
'Freight Type ' 'ZTYPE' '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE ',
'Confirmation ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
'Confirm Date ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
'ZCONFIRMDATE',
'Total Amount ' 'ZTTLAMT' '18' ' ' ' ',
'Created On ' 'ERDAT' '10' ' ' ' ',
'Created By ' 'ERNAM' '10' ' ' ' ',
'Changed On ' 'AEDAT' '10' ' ' ' ',
'Changed By ' 'AENAM' '10' ' ' ' '.
ELSE.
PERFORM af USING :
DESCRIPTION FIELD LEN RTABLE RFIELD
'DI/DBL ' 'ZDIDBL' '14' ' ' ' ',
'Type ' 'TYPE' '04' ' ' ' ',
'Forwarder Code ' 'ZCCODE' '14' ' ' ' ',
'BL Number ' 'ZBL' '14' ' ' ' ',
'BL Date ' 'ZBLDATE' '10' ' ' ' ',
'Invoice Number ' 'ZINVNO' '15' ' ' ' ',
'Extraction ' 'ZSTATUS' '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
'Freight Type ' 'ZTYPE' '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE ',
'Confirmation ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
'Confirm Date ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
'ZCONFIRMDATE',
'Total Amount ' 'ZTTLAMT' '18' ' ' ' ',
'Freight Payment ' 'ZFPTYPE' '14' ' ' ' ',
'Charge Code ' 'ZCHRCODE' '10' ' ' ' ',
'Currency ' 'ZCURCODE' '08' ' ' ' ',
'Quantity ' 'ZQTY' '13' ' ' ' ',
'UoM ' 'ZUOM' '04' ' ' ' ',
'Rate ' 'ZRATE' '15' ' ' ' ',
'Amt(Foreign Curr)' 'ZAMOUNT' '16' ' ' ' ',
'Exchange Rate ' 'ZEXRATE' '13' ' ' ' ',
'Amt(Local Curr) ' 'ZAMOUNTL' '16' ' ' ' ',
'Created On ' 'ERDAT' '10' ' ' ' ',
'Created By ' 'ERNAM' '10' ' ' ' ',
'Changed On ' 'AEDAT' '10' ' ' ' ',
'Changed By ' 'AENAM' '10' ' ' ' '.
ENDIF.
ENDFORM.
FORM af USING text
field
len
table
reffield.
v_count = v_count + 1.
w_catalog-col_pos = v_count.
w_catalog-fieldname = field.
w_catalog-ref_tabname = table.
w_catalog-ref_fieldname = reffield.
w_catalog-seltext_s = text.
w_catalog-seltext_m = text.
w_catalog-seltext_l = text.
w_catalog-outputlen = len.
IF field = 'ZTTLAMT' OR field = 'ZAMOUNTL'.
w_catalog-no_zero = 'X'.
w_catalog-cfieldname = 'WAERK'.
w_catalog-datatype = 'CURR'.
ENDIF.
IF FIELD = 'ZRATE' OR FIELD = 'ZAMOUNT'.
IF field = 'ZAMOUNT'.
w_catalog-no_zero = 'X'.
w_catalog-cfieldname = 'ZCURCODE'.
w_catalog-datatype = 'CURR'.
ENDIF.
IF field = 'ZQTY' OR field = 'ZRATE'.
w_catalog-no_zero = 'X'.
w_catalog-datatype = 'DEC'.
ENDIF.
APPEND w_catalog TO t_catalog.
CLEAR w_catalog.
ENDFORM.
FORM sf USING fieldname sortup group.
v_count = v_count + 1.
CLEAR w_sort.
w_sort-fieldname = fieldname.
w_sort-spos = v_count.
w_sort-up = sortup.
w_sort-group = group.
APPEND w_sort TO t_sort.
ENDFORM.
FORM alv_user_command USING in_ucomm LIKE sy-ucomm
in_selfield TYPE slis_selfield.
DATA: lfs_data LIKE t_data.
IF in_ucomm = '&IC1'.
READ TABLE t_data INDEX in_selfield-tabindex INTO lfs_data.
CHECK NOT lfs_data-zdidbl IS INITIAL.
IF lfs_data-type = 'DBL'.
DATA: l_zdbl LIKE zmsd_diheader-zdinum.
l_zdbl = in_selfield-value.
EXPORT l_zdbl TO MEMORY ID 'VBL'.
CALL TRANSACTION 'ZMSD_BL01'.
ENDIF.
IF lfs_data-type = 'DI'.
DATA: v_dinum LIKE zmsd_diheader-zdinum.
v_dinum = in_selfield-value.
EXPORT v_dinum TO MEMORY ID 'VDI'.
CALL TRANSACTION 'ZMSD_DI01'.
ENDIF.
ENDIF.
ENDFORM.
FORM get_gst_value.
LOOP AT t_det WHERE zsammg = v_zsammg
AND ZINVNO = V_ZINVNO. "MADK991565
CHECK t_data-zccode IN s_zccode.
t_det-zamount = t_det-zamount * t_det-zexrate.
SELECT SINGLE y0mmtarget2
INTO v_target2
FROM y0mmipstranslate
WHERE y0mmdatatype = '70' AND
y0mmsource = t_det-zchrcode.
SELECT SINGLE y0mmtarget1
INTO t_det-type
FROM y0mmipstranslate
WHERE y0mmdatatype = '76' AND
y0mmsource = v_target2.
IF t_det-type NE '3Z'.
v_gsttotal = v_gsttotal +
( t_det-zamount * 5 / 100 ).
ENDIF.
ENDLOOP.
Regards,
Raj.Hello,
Following is the procedure to convert alv output to spool and then it to PDF Format.
After we display the ALV, we can check whether it is running in the background using system field u2018sy-batchu2018. Then,we call an function module named u2018GET_JOB_RUNTIME_INFOu2019 to get the current job information. Then go to spool request table tbtcp to get the spool id.
Get current job details
CALL FUNCTION u2018GET_JOB_RUNTIME_INFOu2019
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> u20180000000000u2032
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
Finally, we can call function module u2018CONVERT_ABAPSPOOLJOB_2_PDFu2018 to convert spool reqeust(which is stored in OTF format) to PDF format. Then we can call either function module u2018SO_DOCUMENT_SEND_API1u2032 or SAP BCS (Business Communication Service) to send the pdf as an email attachment.
CALL FUNCTION u2018CONVERT_ABAPSPOOLJOB_2_PDFu2019
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Regards,
Sayali
Edited by: Sayali Paradkar on Apr 20, 2010 12:51 PM -
Table name input. and output i need all rows and columns using procedures
hi,
question: table name input. and output i need all rows and columns by using procedures.
thanks,
To AllAn example of using DBMS_SQL package to execute dynamic SQL (in this case to generate CSV data in a file)...
As sys user:
CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
/As myuser:
CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
,p_dir IN VARCHAR2
,p_header_file IN VARCHAR2
,p_data_file IN VARCHAR2 := NULL) IS
v_finaltxt VARCHAR2(4000);
v_v_val VARCHAR2(4000);
v_n_val NUMBER;
v_d_val DATE;
v_ret NUMBER;
c NUMBER;
d NUMBER;
col_cnt INTEGER;
f BOOLEAN;
rec_tab DBMS_SQL.DESC_TAB;
col_num NUMBER;
v_fh UTL_FILE.FILE_TYPE;
v_samefile BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
BEGIN
c := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
d := DBMS_SQL.EXECUTE(c);
DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
ELSE
DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
END CASE;
END LOOP;
-- This part outputs the HEADER
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
FOR j in 1..col_cnt
LOOP
v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
IF NOT v_samefile THEN
UTL_FILE.FCLOSE(v_fh);
END IF;
-- This part outputs the DATA
IF NOT v_samefile THEN
v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
END IF;
LOOP
v_ret := DBMS_SQL.FETCH_ROWS(c);
EXIT WHEN v_ret = 0;
v_finaltxt := NULL;
FOR j in 1..col_cnt
LOOP
CASE rec_tab(j).col_type
WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
ELSE
v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
END CASE;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE(v_finaltxt);
UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
END LOOP;
UTL_FILE.FCLOSE(v_fh);
DBMS_SQL.CLOSE_CURSOR(c);
END;This allows for the header row and the data to be written to seperate files if required.
e.g.
SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
PL/SQL procedure successfully completed.Output.txt file contains:
empno,ename,job,mgr,hiredate,sal,comm,deptno
7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
Adapt to output different datatypes and styles are required. -
Is it possible to have different Output options for PO in the backend, like for example if PO is created based on PR coming from SRM SC then the output must be of say type 1, but if the PO is created from the back-end PR or with no connection at all to the PR coming out of SRM then the output must be of type 2??, if yes can some one please tell me how ?? thanks in advance.
Hi. You could link your reqs from SRM to a new PO doc type in R/3.
That way the POs from EBP reqs would have a different doc type to other POs created in R/3.
Then you can have a new output type with a new form and use condition records in MN04 and MN05 to point to different outputs per PO type.
An even easier way would be to have different pruchasing groups for your reqs from EBP, and base the output type on purchasing group.
Regards,
Dave. -
Ad hoc query - Infoset, after selection it is giving two different output
Hi All,
We are facing problem in ad hoc query, after PQAH Ad hoc query, when we go to one infoset, so after making some selection and putting some output field,
When we click on refresh data button(in lower pane) so it gives only one record, which is incorrect, but when we click on u2018Start Outputu2019 button it gives 3 records those are correct.
Can anyone tell me, why this is giving different output.(first time 1 record, and second time 3 records) record 3 output is correct.
Regards,
Kumar
Edited by: kumar r12 on Mar 18, 2011 9:00 AMHi Kumar,
Are you looking at the "Hit List" or the output of the results in the lower pane? The hit list will only give you the number of persons who will be in your output. The refresh button should give you a preview of the output.
What persons or fields are different or not shown in the preview area vs. the output? Also, what are the dates for the data? Are you looking at current data or looking for history? The output may be showing you history and the preview only current data. Most concerns with Ad Hoc Query output are related to dates - for the selection and the output.
Paul
Maybe you are looking for
-
My new iPod touch is getting really warm while I use it. Is it normal? I mean, I have silicone cover, maybe it's the reason for iPod being so HOT?... How do you think, is it too important to have a cover on the iPod? How about screen protector? :S
-
Error exporting Premiere CS6 sequence to edit in Audition CS6
Hi there! I've been trying to export a sequence from Premiere CS6 to edit in Audition CS6 through "edit>edit in Adobe Audition>sequence". However, I keep receiving the following error message: Premiere Pro has encountered an error. [../../Src/Sequenc
-
Viewer clicks once but link does not open
Why is it that on some Flash sites one must click twice in order for the link to open?
-
Frustratingly setting up the Airport Extreme
O.K- i have comcast. and i had a linksys- but everything else i own is apple- so why not, right? i plugged it and got going. i cannot get very far. it does not automatically find the DNS servers, no domain name or domain address. first page: country
-
Errors in Job Queue for Timesheet
I am having errors in my Job Queue when i fill the timesheet (fill+send+approve) and also when i delete the timesheet from Manage Timesheet or from Delete Enterprise object. Following is the error description; 1. For Timesheet Fill and submision: Job