Field data in sm30 to be saved
H
For the photovoltaic modules test, i will run the program using LabView software.. For each test done, it will give me a results which is presented in an excel data.. (Like attached below).. However, i will run more than 1 test on this module..
So my question is, how do i save all these results together in one databank/ database.. is there a way? :-s im an IT Blind so hope my question make sense..
Attachments:
Heckert Solar - 08220483.xls 365 KB
Similar Messages
-
How can we protect the ztable non key fields data in sm30 display.
Hi experts,
I have created tablemaintenence generator for one z table, in sm30 user has access to enter the data.
in that maintenence i have to protect the non key field values data like once the user saves his data.than in the edit mode it has to show the nonkey fields data but dont access to edit some nonkey fields... please helpHi
U need to change the screen flow generated by maintenance view generator: here go to Enviroments->Modifications->Screen; doubleclick on your screen and the system take you to screen painter.
Here go to screen flow and in PBO add new module in order to protect the field for the old records: u can use the statament LOOP AT SCREEN./ENDLOOP to do it.
LOOP AT SCREEN.
IF .....
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Max -
Do validations on fields while User enters data thru SM30
Hi All,
I am creating a custom table and would like to validate the data when user is entering the data thru SM30 manually and display appropiate status or error messages if the data entered is wrong. Also i have to allow only those users that are assigned for that role to access the table and should be able to Add and Update but not delete any record from the table. This is Urgent as i have to get this done real quick and then test my program on it. Any help will be greatly appreciated.
Thanks in advance,
David.David,
For doing validations you need to make use of modification event
<b>01 Before saving the data in the database</b>
Refer to link for list of events available
<a href="http://help.sap.com/saphelp_47x200/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm">Extended Table Maintenance Events</a>
To control with authorization please refer to the link below.
<a href="http://help.sap.com/saphelp_47x200/helpdata/en/a7/5134d2407a11d1893b0000e8323c4f/frameset.htm">Maintain authorization groups</a>
Refer to this blog for event creations
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc</a>
Regds
Manohar -
Sorting While maintaining data through SM30
Hi Techies,
I have developed a z-table with key fields a,b & c. Now when I am entering data through SM30, C(Char field) field is getting sorted after saving.
My requirement is to store the data in table without any sorting. Actually this field C has some sequencing issue. So, Is there any event for table which can be used to resolve this issue.
Note: I have already tried Event 01 by creating a new include and giving my ID breakpoint. But its noty trigerring .
Any advice would be deeeply appreciated.
Thanks & Regards,
VinitHi Florian,
Actually The field 'C' mentioned above contains the name of chemical compounds. I am fetching this data from databse and displaying in printout. In printout the user wants the field 'C' should get displayed accoridng to Chemical Sequence.
Currently the data in Legacy system is stored in that manner. I just wanted to know if v can restrict the sorting of field C, Than i dont have to write extra logic for displaying data in printout.
Hope you understand the exact issue.
Any suggestions would be appreciated.
Note: yes i checked in SE16, SE16N & SE11, but same issue.
Regards,
Vinit
Edited by: vinit005 on Sep 16, 2011 9:33 AM -
Making Fields mandatory in SM30
Does anybody know how can we make fields in SM30 as mandatory. If we have 4 fields in some Z-table, i want to make 2 of the fields mandatory...Pls help me out.
Two methods for this
1. Put code in table maintenance
You have to put some code in while generating table maintenance screen from table maintenace generator which will validate the field when user try to enter data using SM30..
Goto table maintenace generator follow menu path
Enviroment->Modification->Event
Add a event there (01 Before saving the data in the database) and code to validate data... this code will be called before saving data in database via transaction SM30.
2 .Modify screen
Follow menu path Enviroment->Modification->Maintenance Screen
And make the field require field -
E-Recruiting - Hiring Manager field data is changing to 00000000 in job requisition
Hi Nicole,
I am facing an issue with hiring manager search.
Am on a EREC standalone system. EHP5, SP0007.
HCM_ERC_CI_2 & 3 business functions are activated.
NB data is available in 5131 for US of hiring managers, 5152 support group also has hiring manager data is available.
1. Firstly, as a recruiter when I click on "Create by Position", after selecting the vacant position thro org.unit based search, the hiring manager field is not populated with any employee no. If am trying to search using Find Manager or Find employee option, no output is given.
So I manually give the Manager employee number, then hiring manager field is getting filled. After saving the requisition, when I come back and see the requisition in "All Requisition" query or "Open Requisition query" in the Manager column it is blank.
2. When I try to open the same requisition to edit, the Hiring Manager field is having value "00000000". Even after again manually giving the manager employee number and saving it and releasing it, if again we try to display/edit the requisition, the number vanishes and only zeros appear.
Please share your inputs on the possible cause for this problem.
Regards,
ER.Hi ER,
1. That's explained under: http://wiki.scn.sap.com/wiki/x/XYHYDw
2. could be a side-effect of 1.
Regards,
Nicole -
Value in payment terms field not dispalyed in invoice after saving MIRO
Hi,
I Implemented the BADI- MRM_PAYMENT_TERMS to populate GR date as baseline date in invoice,
But after saving the invoice when I display the invoice document in MIR4 it not showing the payment terms. It only show the condition ie the discount get in no of days. It show
payment terms - (Blank)
Payment in - 14 days 4%
payment in - 30 days 2 % .
Can anybody help me on this why this peculiar behavior of transaction after activating BADI.....
Regards,
Aditya
Edited by: Aditya rayalu on Jan 28, 2011 7:37 AMHi,
have a look at this OSS Note:
Note 432332 - MIR4 - Field ZTERM is not filled
https://service.sap.com/sap/support/notes/432332
Best regards. -
Reflection errors in Field Data Edit Scripting context(Line Item class)
Hello Experts,
I have a script that does some validation in the Field Data Edit Scripting context of the "Line Item" class, and I have "MATERIAL" as my target. when i try throwing an Application Exception in this context I get a reflection error message box instead of the message I have passed to the Application Exception constructor.
your help will be greatly appreciated.
kind regards,One thing to be aware of is that no matter how you choose to construct your exception in field, field data edit and collection scripts, the attribute is always set to the be the taget field/collection. Have you noticed that? The script designers made things that way. What's going on here is that the exception raised in the Interprer is caught by the Script Manager and rethrown with the script target as the attribute and your raised exception as the exception.
One other thing I would point out is that scripts set to execute on the Collection Member Lifecycle event tend to be poor performers. You can get a faster result if you edit whole collection and chain the errors onto one ChainException. I can only speculate as to why, but I have seen major improvements in complex scripts if I iterate the whole collection, versus implementing a collection memeber lifecycle validate event. This is counter-intuitive, but there it is.
Finally, exceptions raised in Collection Lifecycle Events that interupt the overall save process in the prescence of parent document Lifecycle Validation events can result in partially saved data. I observed this issue a few years back and it may be resolved now. The only member lifecycle event I use is Created, to lock, default, etc.
So, for your particular problem, you may want to rethink your strategy and see if you can get things to work for you bypassing that reflection issue. If you still can't raise the exception on MATERIAL, maybe you can raise it on another field, because another advantage of this approach is that you have full control to raise any error on any field on the Line Items. -
CRM 5.2 WEB UI Technical - Copy Category2 field data to Description field
Hi All,
I am working on CRM technical part.
In the process of creating a sales request/Complaint, the end user input the data in category 1 and category 2 fields. In the same page/screen there is a field called Description. What ever the value user enters in the Category 2 field should appear in Description field before the serveice ticket is saved.
guys, could you please help me out in achieving this?Hi,
U can assign an event to your Description field. End user will input value in Category2 field and then will click on description field. IAt this moment event will get triggered and in this event U need to write code to fetch value of category2 and then dispay this value through a variable assigned to Description field in .htm page.
Reward points if it helps.
Regards,
Viks -
Key Fields, Data Fields, Key Figures and Characteristis, Dimesions & Key Fi
Hi All,
Can any one please describe more about the below terms and with the Example....
Like when we identify which one is Key filelds and Data fileds, how to distingush creating new dimesions (Is it based on user reporting) Key figures in Dimestions...
DSO/ODS: Key fields, Data Fields
InfoCube: Dimensions, Key Figures
Infoobjects: Key figures, Characteritics
Regards,
PremHi,
Search through SDN for more information on these concepts,
Re: ods data fields or key fields?
Re: Key Fields and Data Fields in ODS
defining Key -field and data fields
Regards,
Mani -
Unable to save lookup field data in SharePoint 2013 online list
Dear Support,
I had successfully created provider hosted app and deployed on SharePoint 2013 online site, in my project I created orderservice.asmx.cs web service and write a code for save record on SharePoint
2013 online list as I mentioned below and calling on App1.js file.
But I am unable to save lookup field value as mentioned below code
Customer is a lookup field I want to save data in SharePoint 2013 online list( Order)where I had successfully
inserted text field data (Title &
Special_x0020_Instruction).
i am getting error as mentioned below
500 Internal Server Error {"Message":"Invalid web service call, missing value for parameter: \u0027Title1\u0027.","StackTrace":" at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2
parameters)\r\n at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData,
IDictionary`2 rawParams)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
Please let me know the code how to insert lookup field value (Customer)
in SharePoint online list.
OrderService.asmx.cs
Public
int InsertOrder (Order
orderRecord)
pwd.MakeReadOnly();
clientContext.Credentials =
new
SharePointOnlineCredentials (myUserName, pwd);
try
Web
oWeb = clientContext.Web;
ListCollection lists = oWeb.Lists;
List oOrderlist = clientContext.Web.Lists.GetByTitle("Order");
clientContext.Load<ListCollection>(lists);
clientContext.Load<List>(oOrderlist);
ListItemCreationInformation
itemCreateInfo = new ListItemCreationInformation();
ListItem oListItem = oOrderlist.AddItem(itemCreateInfo);
oListItem["Title"]
= Title; listItem["Special_x0020_Instruction"]
= orderRecord.Instruction;
listItem ["Customer"]
= orderRecord.CustomerId;
listItem.Update();
clientContext.ExecuteQuery();
return 1;
catch
return -1;
App1.JS
$("#Save").click(function
debugger;
var OrderProfile = $('#orderprofile').val();
var CustomerId = $('#exCustomerlist').jqxComboBox('getItem',
$('#exCustomerlist').val());
//var Instruction = $('#instruction').val();
alert(OrderProfile);
alert(CustomerId);
var obj = {
'Title': OrderProfile,
'Customer': CustomerId }
$.ajax({
url:
"OrderService.asmx/InsertOrder",
type:
"POST",
dataType:
"json",
data: JSON.stringify(obj),
contentType:
"application/json; charset=utf-8",
beforeSend:
function (XMLHttpRequest) {
//Specifying this header ensures that the results will be returned as JSON.
XMLHttpRequest.setRequestHeader("Accept",
"application/json");
success:
function (response) {
$(".errMsg ul").remove();
var myObject = response.d;
alert(myObject);
error:
function (response) {
alert(response.status +
' ' + response.statusText +
' ' + response.responseText);
Regards,
AkhileshHi Alex Brassington,
Thanks for your reply.
I am having the Site Administrator Permission of the public site.
I am having the permission of Company Administrator of that site but still unable to find
Device Channel on Site Setting. still I gave the user full control from Site Permission but nothing is happening.
What should I do next? -
Download the KTOPL field data and GLT0 table data into one Internal table
Hi,
I have downloaded GLT0 table fields data to PC file . But i need to download KTOPL(Chart Of Accounts) data also. in GLT0 table there is no KTOPL field.
But in SKA1 table have KTOPL field. Then what is the issue is GLT0 data & KTOPL field data needs to download into one Internal Table.
anybody could you please solve this problem. immediately need to solve this.
Below is the code.
REPORT ZFXXEABL_1 NO STANDARD PAGE HEADING
LINE-SIZE 200.
Tables Declaration
TABLES : GLT0.
Data Declaration
DATA : FP(8) TYPE C,
YEAR LIKE GLT0-RYEAR,
PERIOD(3) TYPE C,
DBALANCE LIKE VBAP-NETWR VALUE 0 ,
CBALANCE LIKE VBAP-NETWR VALUE 0.
*Internal table for for final data..
DATA : BEGIN OF REC1 OCCURS 0,
BAL LIKE GLT0-TSLVT value 0,
COAREA LIKE GLT0-RBUSA,
CA(4) TYPE C,
KTOPL LIKE ska1-ktopl,
CCODE LIKE GLT0-BUKRS,
CREDIT LIKE VBAP-NETWR,
CURRENCY LIKE GLT0-RTCUR,
CURTYPE(2) TYPE N,
DEBIT LIKE VBAP-NETWR,
YEAR(8) TYPE C,
FY(2) TYPE C,
ACCOUNT LIKE GLT0-RACCT,
VER LIKE GLT0-RVERS,
VTYPE(2) TYPE N,
CLNT LIKE SY-MANDT,
S_SYS(3) TYPE C,
INDICATOR LIKE GLT0-DRCRK,
END OF REC1.
DATA : C(2) TYPE N,
D(2) TYPE N.
DATA REC1_H LIKE REC1.
Variable declarations
DATA :
W_FILES(4) TYPE N,
W_DEBIT LIKE GLT0-TSLVT,
W_CREDIT LIKE GLT0-TSLVT,
W_PCFILE LIKE RLGRAP-FILENAME ,
W_UNIXFILE LIKE RLGRAP-FILENAME,
W_PCFILE1 LIKE RLGRAP-FILENAME,
W_UNIXFIL1 LIKE RLGRAP-FILENAME,
W_EXT(3) TYPE C,
W_UEXT(3) TYPE C,
W_PATH LIKE RLGRAP-FILENAME,
W_UPATH LIKE RLGRAP-FILENAME,
W_FIRST(1) TYPE C VALUE 'Y',
W_CFIRST(1) TYPE C VALUE 'Y',
W_PCFIL LIKE RLGRAP-FILENAME.
DATA: "REC LIKE GLT0 OCCURS 0 WITH HEADER LINE,
T_TEMP LIKE GLT0 OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF REC3 OCCURS 0.
INCLUDE STRUCTURE GLT0.
DATA: KTOPL LIKE SKA1-KTOPL,
END OF REC3.
DATA: BEGIN OF T_KTOPL OCCURS 0,
KTOPL LIKE SKA1-KTOPL,
SAKNR LIKE SKA1-SAKNR,
END OF T_KTOPL.
Download data.
DATA: BEGIN OF I_REC2 OCCURS 0,
BAL(17), " like GLT0-TSLVT value 0,
COAREA(4), " like glt0-rbusa,
CA(4), " chart of accounts
CCODE(4), " like glt0-bukrs,
CREDIT(17), " like vbap-netwr,
CURRENCY(5), " like glt0-rtcur,
CURTYPE(2), " type n,
DEBIT(17), " like vbap-netwr,
YEAR(8), " type c,
FY(2), " type c, fiscal yr variant
ACCOUNT(10), " like glt0-racct,
VER(3), " like glt0-rvers,
VTYPE(3), " type n,
CLNT(3), "like sy-mandt,
S_SYS(3), "like sy-sysid,
INDICATOR(1), " like glt0-drcrk,
END OF I_REC2.
Selection screen. *
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1.
SELECT-OPTIONS : COMPCODE FOR GLT0-BUKRS,
GLACC FOR GLT0-RACCT,
FISYEAR FOR GLT0-RYEAR,
no intervals no-extension, "- BG6661-070212
FISCPER FOR GLT0-RPMAX,
busarea for glt0-rbusa,
CURRENCY FOR GLT0-RTCUR.
SELECTION-SCREEN END OF BLOCK BL1.
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-BL2.
PARAMETERS:
P_UNIX AS CHECKBOX, "Check box for Unix Option
P_UNFIL LIKE RLGRAP-FILENAME, " Unix file Dnload file name
default '/var/opt/arch/extract/GLT0.ASC', "- BG6661-070212
P_PCFILE AS CHECKBOX, "Check box for Local PC download.
P_PCFIL LIKE RLGRAP-FILENAME " PC file Dnload file name
default 'C:\GLT0.ASC'. "- BG6661-070212
DEFAULT 'C:\glt0_gl_balance_all.asc'. "+ BG6661-070212
SELECTION-SCREEN END OF BLOCK BL2.
*eject
Initialization. *
INITIALIZATION.
Try to default download filename
p_pcfil = c_pcfile.
p_unfil = c_unixfile.
if sy-sysid eq c_n01.
p_unfil = c_unixfile.
endif.
if sy-sysid eq c_g21.
p_unfil = c_g21_unixfile.
endif.
if sy-sysid eq c_g9d.
p_unfil = c_g9d_unixfile.
endif.
Default for download filename
*{ Begin of BG6661-070212
CONCATENATE C_UNIXFILE
SY-SYSID C_FSLASH C_CHRON C_FILENAME INTO P_UNFIL.
*} End of BG6661-070212
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if screen-name = 'P_PCFIL'. "PC FILE
screen-input = '0'.
modify screen.
endif.
if screen-name = 'P_UNFIL'. "UN FILE
screen-input = '0'.
modify screen.
endif.
endloop.
if w_first = 'Y'.
perform path_file.
w_first = 'N'.
endif.
if w_cfirst = 'Y'.
perform cpath_file.
w_cfirst = 'N'.
endif.
Start-of-Selection. *
START-OF-SELECTION.
*COLLECT DATA
PERFORM COLLECT_DATA.
*BUILD FILENAMES
PERFORM BUILD_FILES.
*LOCAL
IF P_PCFILE = C_YES.
PERFORM LOCAL_DOWNLOAD.
ENDIF.
*UNIX
IF P_UNIX = C_YES.
PERFORM UNIX_DOWNLOAD.
ENDIF.
IF P_PCFILE IS INITIAL AND P_UNIX IS INITIAL.
MESSAGE I000(ZL) WITH 'Down load flags both are unchecked'.
ENDIF.
END-OF-SELECTION.
IF P_PCFILE = C_YES.
WRITE :/ 'PC File' , C_UNDER, P_PCFIL.
ENDIF.
*& Form DOWNLOAD
Download *
FORM DOWNLOAD.
P_PCFIL = W_PATH.
DATA LIN TYPE I.
DESCRIBE TABLE I_REC2 LINES LIN.
WRITE:/ 'No of Records downloaded = ',LIN.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = P_PCFIL
FILETYPE = C_ASC "c_dat "dat
TABLES
DATA_TAB = I_REC2 " t_str
fieldnames = t_strhd
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
IF SY-SUBRC EQ 0.
ENDIF.
ENDFORM.
*& Form WRITE_TO_SERVER
text *
--> p1 text
<-- p2 text
FORM WRITE_TO_SERVER.
DATA : L_MSG(100) TYPE C,
L_LINE(5000) TYPE C.
P_UNFIL = W_UPATH.
DATA LIN TYPE I.
DESCRIBE TABLE I_REC2 LINES LIN.
WRITE:/ 'No of Records downloaded = ',LIN.
OPEN DATASET P_UNFIL FOR OUTPUT IN TEXT MODE. " message l_msg.
IF SY-SUBRC <> 0.
WRITE: / L_MSG.
ENDIF.
perform header_text1.
LOOP AT I_REC2.
TRANSFER I_REC2 TO P_UNFIL.
ENDLOOP.
CLOSE DATASET P_UNFIL.
WRITE : / C_TEXT , W_UPATH.
SPLIT W_UNIXFILE AT C_DOT INTO W_UNIXFIL1 W_UEXT.
CLEAR W_UPATH.
IF NOT W_UEXT IS INITIAL.
CONCATENATE W_UNIXFIL1 C_DOT W_UEXT INTO W_UPATH.
ELSE.
W_UEXT = C_ASC. " c_csv.
CONCATENATE W_UNIXFIL1 C_DOT W_UEXT INTO W_UPATH.
ENDIF.
ENDFORM. " WRITE_TO_SERVER
*& Form BUILD_FILES
FORM BUILD_FILES.
IF P_PCFILE = C_YES.
W_PCFILE = P_PCFIL.
***Split path at dot**
SPLIT W_PCFILE AT C_DOT INTO W_PCFILE1 W_EXT.
IF NOT W_EXT IS INITIAL.
CONCATENATE W_PCFILE1 C_DOT W_EXT INTO W_PATH.
ELSE.
W_PATH = W_PCFILE1.
ENDIF.
ENDIF.
IF P_UNIX = C_YES.
W_UNIXFILE = P_UNFIL.
SPLIT W_UNIXFILE AT C_DOT INTO W_UNIXFIL1 W_UEXT.
IF NOT W_UEXT IS INITIAL.
CONCATENATE W_UNIXFIL1 C_DOT W_UEXT INTO W_UPATH.
ELSE.
W_UPATH = W_UNIXFIL1.
ENDIF.
ENDIF.
ENDFORM.
FORM CPATH_FILE.
CLEAR P_PCFIL.
CONCATENATE C_PCFILE
C_COMFILE SY-SYSID C_UNDER SY-DATUM SY-UZEIT
C_DOT C_ASC INTO P_PCFIL.
ENDFORM. " CPATH_FILE
FORM PATH_FILE.
CLEAR P_UNFIL.
if sy-sysid eq c_n01.
CONCATENATE C_UNIXFILE
C_COMFILE SY-SYSID C_UNDER SY-DATUM SY-UZEIT
C_DOT C_ASC INTO P_UNFIL.
endif.
if sy-sysid eq c_g21.
concatenate c_g21_unixfile
c_comfile sy-sysid c_under sy-datum sy-uzeit
c_dot c_asc into p_unfil.
endif.
if sy-sysid eq c_g9d.
concatenate c_g9d_unixfile
c_comfile sy-sysid c_under sy-datum sy-uzeit
c_dot c_asc into p_unfil.
endif.
ENDFORM. " PATH_FILE
Local_Download *
Local *
FORM LOCAL_DOWNLOAD.
perform header_text.
LOOP AT REC1.
REC1-CLNT = SY-MANDT.
REC1-S_SYS = SY-SYSID.
MOVE: REC1-BAL TO I_REC2-BAL,
REC1-COAREA TO I_REC2-COAREA,
REC1-CA TO I_REC2-CA,
REC1-KTOPL TO I_REC2-CA,
REC1-CCODE TO I_REC2-CCODE,
REC1-CREDIT TO I_REC2-CREDIT,
REC1-CURRENCY TO I_REC2-CURRENCY,
REC1-CURTYPE TO I_REC2-CURTYPE,
REC1-DEBIT TO I_REC2-DEBIT,
REC1-YEAR TO I_REC2-YEAR,
REC1-FY TO I_REC2-FY,
REC1-ACCOUNT TO I_REC2-ACCOUNT,
REC1-VER TO I_REC2-VER,
REC1-VTYPE TO I_REC2-VTYPE,
REC1-CLNT TO I_REC2-CLNT,
REC1-S_SYS TO I_REC2-S_SYS,
REC1-INDICATOR TO I_REC2-INDICATOR.
APPEND I_REC2.
CLEAR I_REC2.
ENDLOOP.
IF NOT I_REC2[] IS INITIAL.
PERFORM DOWNLOAD .
CLEAR I_REC2.
REFRESH I_REC2.
ELSE.
WRITE : / ' no record exist due to unavailability of data'.
ENDIF.
ENDFORM. " LOCAL_DOWNLOAD
*& Form UNIX_DOWNLOAD
FORM UNIX_DOWNLOAD.
LOOP AT REC1.
REC1-CLNT = SY-MANDT.
REC1-S_SYS = SY-SYSID.
MOVE: REC1-BAL TO I_REC2-BAL,
REC1-COAREA TO I_REC2-COAREA,
REC1-CA TO I_REC2-CA,
REC1-KTOPL TO I_REC2-CA,
REC1-CCODE TO I_REC2-CCODE,
REC1-CREDIT TO I_REC2-CREDIT,
REC1-CURRENCY TO I_REC2-CURRENCY,
REC1-CURTYPE TO I_REC2-CURTYPE,
REC1-DEBIT TO I_REC2-DEBIT,
REC1-YEAR TO I_REC2-YEAR,
REC1-FY TO I_REC2-FY,
REC1-ACCOUNT TO I_REC2-ACCOUNT,
REC1-VER TO I_REC2-VER,
REC1-VTYPE TO I_REC2-VTYPE,
SY-MANDT TO I_REC2-CLNT,
SY-SYSID TO I_REC2-S_SYS,
REC1-INDICATOR TO I_REC2-INDICATOR.
APPEND I_REC2.
CLEAR I_REC2.
ENDLOOP.
IF NOT I_REC2[] IS INITIAL.
PERFORM WRITE_TO_SERVER.
CLEAR I_REC2.
REFRESH I_REC2.
ELSE.
WRITE : / ' no record exist due to unavailability of data'.
ENDIF.
ENDFORM. " UNIX_DOWNLOAD
*& Form HEADER_TEXT
text *
--> p1 text
<-- p2 text
*form header_text.
concatenate c_bal c_ba c_ca c_cc c_credit c_currency c_curtype
c_debit c_fisyear c_fisvar c_acct c_ver c_vtype c_indicator
into t_strhd
separated by c_comma.
append t_strhd.
*endform. " HEADER_TEXT
*& Form HEADER_TEXT1
text *
*form header_text1.
concatenate c_bal c_ba c_ca c_cc c_credit c_currency c_curtype
c_debit c_fisyear c_fisvar c_acct c_ver c_vtype c_indicator
into t_strhd1
separated by c_comma.
append t_strhd1.
transfer t_strhd1 to p_unfil.
*endform. " HEADER_TEXT1
*& Form COLLECT_DATA
Collect Data *
FORM COLLECT_DATA.
SELECT * FROM GLT0 INTO TABLE REC3
WHERE BUKRS IN COMPCODE
AND RYEAR IN FISYEAR
AND RPMAX IN FISCPER
AND RACCT IN GLACC
AND RTCUR IN CURRENCY.
SELECT KTOPL FROM SKA1
INTO TABLE T_KTOPL
FOR ALL ENTRIES IN REC3
WHERE SAKNR = REC3-RACCT.
LOOP AT REC3 .
select *
from glt0
into table t_temp
where rldnr = rec-rldnr
and rrcty = rec-rrcty
and rvers = rec-rvers
and bukrs = rec-bukrs
and ryear = rec-ryear
and racct = rec-racct
and rbusa = rec-rbusa
and rtcur <> 'ZAR'
and rpmax = rec-rpmax.
if sy-subrc = 0.
rec1-bal = '0.00'.
else.
rec1-bal = rec-hslvt.
endif.
*READ TABLE T_KTOPL WITH KEY SAKNR = REC-RACCT BINARY SEARCH.
MOVE T_KTOPL-KTOPL TO REC3-KTOPL.
CLEAR: CBALANCE, DBALANCE.
REC1-BAL = REC3-HSLVT.
IF REC3-DRCRK = 'S'.
IF REC3-HSLVT NE C_ZERO.
YEAR = REC-RYEAR.
PERIOD = '000'.
CONCATENATE PERIOD C_DOT YEAR INTO FP.
REC1-INDICATOR = REC-DRCRK.
REC1-DEBIT = C_ZERO.
REC1-CREDIT = C_ZERO.
REC1-CCODE = REC-BUKRS.
REC1-YEAR = FP.
REC1-CURRENCY = REC-RTCUR.
REC1-ACCOUNT = REC-RACCT.
rec1-bal = rec-hslvt.
dbalance = rec1-bal.
REC1-CURTYPE = C_CTYPE.
REC1-FY = C_FY.
REC1-COAREA = REC-RBUSA.
REC1-VER = REC-RVERS.
REC1-VTYPE = C_CTYPE.
REC1-CA = C_CHART.
APPEND REC1.
C = 0.
PERFORM D.
ENDIF.
IF REC3-HSL01 NE C_ZERO.
YEAR = REC3-RYEAR.
PERIOD = '001'.
CONCATENATE PERIOD C_DOT YEAR INTO FP.
REC1-INDICATOR = REC3-DRCRK.
REC1-DEBIT = REC3-HSL01 .
REC1-CCODE = REC3-BUKRS.
REC1-YEAR = FP.
REC1-CURRENCY = REC3-RTCUR.
REC1-ACCOUNT = REC3-RACCT.
rec1-bal = REC3-hsl01 + dbalance.
dbalance = rec1-bal.
REC1-CURTYPE = C_CTYPE.
REC1-FY = C_FY.
REC1-COAREA = REC3-RBUSA.
REC1-VER = REC3-RVERS.
REC1-VTYPE = C_CTYPE.
REC1-CA = C_CHART.
REC1-KTOPL = REC3-KTOPL.
APPEND REC1.
C = 1.
PERFORM D.
ENDIF.
IF REC3-HSL02 NE C_ZERO.
REC1-DEBIT = REC3-HSL02.
YEAR = REC3-RYEAR.
PERIOD = '002'.
CONCATENATE PERIOD C_DOT YEAR INTO FP.
REC1-INDICATOR = REC3-DRCRK.
REC1-DEBIT = REC3-HSL02.
REC1-CCODE = REC3-BUKRS.
REC1-YEAR = FP.
REC1-CURRENCY = REC3-RTCUR.
REC1-ACCOUNT = REC3-RACCT.
rec1-bal = REC3-hsl02 + dbalance.
dbalance = rec1-bal.
REC1-CURTYPE = C_CTYPE.
REC1-FY = C_FY.
REC1-COAREA = REC3-RBUSA.
REC1-VER = REC3-RVERS.
REC1-VTYPE = C_CTYPE.
REC1-CA = C_CHART. "-BF7957-070503
REC1-KTOPL = REC3-KTOPL. "+BF7957-070503
APPEND REC1.
C = 2.
PERFORM D.
ENDIF.
IF REC3-HSL03 NE C_ZERO.
YEAR = REC3-RYEAR.
PERIOD = '003'.
CONCATENATE PERIOD C_DOT YEAR INTO FP.
REC1-INDICATOR = REC3-DRCRK.
REC1-DEBIT = REC3-HSL03.
REC1-CCODE = REC3-BUKRS.
REC1-YEAR = FP.
REC1-CURRENCY = REC3-RTCUR.
REC1-ACCOUNT = REC3-RACCT.
rec1-bal = REC3-hsl03 + dbalance .
dbalance = rec1-bal.
REC1-CURTYPE = C_CTYPE.
REC1-FY = C_FY.
REC1-COAREA = REC3-RBUSA.
REC1-VER = REC3-RVERS.
REC1-VTYPE = C_CTYPE.
REC1-CA = C_CHART. "-BF7957-070503
REC1-KTOPL = REC3-KTOPL. "+BF7957-070503
APPEND REC1.
C = 3.
PERFORM D.
ENDIF.
IF REC3-HSL04 NE C_ZERO.
REC1-DEBIT = REC3-HSL04.
YEAR = REC3-RYEAR.
PERIOD = '004'.
CONCATENATE PERIOD C_DOT YEAR INTO FP.
REC1-INDICATOR = REC3-DRCRK.
REC1-DEBIT = REC3-HSL04.
REC1-CCODE = REC3-BUKRS.
REC1-YEAR = FP.
REC1-CURRENCY = REC3-RTCUR.
REC1-ACCOUNT = REC3-RACCT.
rec1-bal = REC3-hsl04 + dbalance .
REC1-CURTYPE = C_CTYPE.
REC1-FY = C_FY.
REC1-COAREA = REC3-RBUSA.
REC1-VER = REC3-RVERS.
REC1-VTYPE = C_CTYPE.
REC1-CA = C_CHART. "-BF7957-070503
REC1-KTOPL = REC3-KTOPL. "+BF7957-070503
APPEND REC1.
dbalance = rec1-bal.
C = 4.
PERFORM D.
ENDIF.
Thanks and Regards,
Ramuse logical database SDF, nodes ska1 and skc1c
A. -
Unicode - "DMBTR" must be a character-type field (data type C,N,D or T)
Greetings Experts!
I am trying to convert legacy code to Unicode for a current ERP6.0 reinstallation and have encountered the syntax error "DMBTR" must be a character-type field (data type C,N,D or T)
The field is part of a structure and the fields attributes are as follows:
COMPONENT = DMBTR
COMPONENT TYPE = DMBTR
DATA TYPE = CURR
LENGTH = 13
DECIMALS = 2
DESCRIPTION = Amount in Local Currency
The code in question is as follows:-
macro Move_Zoned.
Converts a numeric variable to zoned format and moves it to a
target variable.
DEFINE move_zoned.
&1 - source variable
&2 - Number of Decimal Places
&3 - 'To'
&4 - Target Variable.
write &1 to w_zoned no-grouping decimals &2.
condense w_zoned.
Remove the Decimal Points.
search w_zoned for '...'.
while sy-subrc = 0.
move sy-fdpos to w_to_point.
if w_to_point = 0.
w_to_point = 1.
endif.
compute w_from_point = sy-fdpos + 1.
concatenate w_zoned+0(w_to_point)
w_zoned+w_from_point
into w_zoned.
search w_zoned for '...'.
endwhile.
shift w_zoned right deleting trailing space.
translate w_zoned using ' 0'.
call function 'Z_TRANSLATE_ZONED_DECIMALS'
exporting
i_input = w_zoned
importing
i_output = w_zoned
exceptions
x_invalid_zoned_char = c_invalid_zoned_char
x_numeric_info_lost = c_numeric_info_lost
others = c_other_zoned_error.
Get the length of the recipient field so we don't truncate the
numbers....
describe field &4 length w_flength in character mode.
describe field &4 type w_type.
describe field w_zoned length w_zoned_len in character mode.
if w_zoned_len <= w_flength.
move w_zoned to &4.
shift &4 right deleting trailing space.
translate &4 using ' 0'.
else.
Get the start position....
If it's a packed field allow for values up to 6 figures
compute w_zoned_len = w_zoned_len - w_flength.
if w_type = 'P'.
subtract 2 from w_zoned_len.
clear w_type.
endif.
move w_zoned+w_zoned_len &3 &4.
endif.
END-OF-DEFINITION. "Move_zoned
LOOP AT t_single_kunnr.
move_zoned t_single_kunnr-postamt 2
to t_single_kunnr-dmbtr.
DIVIDE t_single_kunnr-dmbtr BY 100.
MODIFY t_single_kunnr.
ENDLOOP.
Is there a solution to get past this syntax error as I would rather not change the datatype of the field in the structure.
Much Obliged
Elphick.Type X is not allowed in Unicode. When a field is declared as Type X with Value u201809u2019 or any other value, it can be resolved by using classes.
Before Unicode
CONSTANTS: c_hex TYPE x VALUE '09'.
Resolution:
Itu2019s work for any value of x.
First a temporary field of Type c should declare. Following class will convert Type x variable into type c.
Example:
CONSTANTS: c_hex TYPE x VALUE '09'.
DATA: LV_TEMP TYPE STRING.
DATA: LV_TMP TYPE C.
TRY.
CALL METHOD CL_ABAP_CONV_IN_CE=>UCCP
EXPORTING
UCCP = c_hex
RECEIVING
CHAR = LV_TMP .
CATCH CX_SY_CONVERSION_CODEPAGE.
CATCH CX_PARAMETER_INVALID_TYPE.
CATCH CX_SY_CODEPAGE_CONVERTER_INIT.
ENDTRY.
CONCATENATE I_OUTPUT-BKTXT I_OUTPUT-BVORG
I_OUTPUT-BUDAT I_OUTPUT-MESSAGE INTO
SEPARATED BY LV_TMP.
I_BUFFER = LV_TEMP.
CLEAR LV_TEMP.
CLEAR LV_TMP.
OR
Note: It works only for type x value 09.
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS: c_hex TYPE c VALUE
abap_char_utilities=>HORIZONTAL_TAB. -
How to update flex field data on a human task?
After entering a human task and assigning the data how do you then update flex field data whilst the task is still assigned. I'm using the task services to communicate with the task and applying filters based on the flex field data.
I want to update the data when actions take place on the task e.g. suspend, aquire, release.
Any ideas?You can fetch the task , change the flex attribute value and update the task. Find below the steps we do for updating one of the TextAttribute
Task completeTask = // get the task using task query service
completeTask.getSystemMessageAttributes().setTextAttribute2(updatedfolderName);
completeTask = // update the task using "updateTask" method -
Service po created with reference to preq , in po some fields data was miss
i was created preq with item type D and account assignment category = network , uploading point data and recipient data.
after that i was created po with reference to that preq , in that po uploading field , recipient field data was missing , how to get that data in service poHi,
In service documents and blanket PO's the "goods recipient" can not
be used. Please read the information from the note 118008:
The system does not display the goods recipient and unloading point
fields in the account assignment block for a service line even though
they are set as input fields in Customizing.
You cannot display fields 'Unloading Point' and/or 'Goods Recipient' in
the R/3 system. The reason for this is that every account assignment
object for each service specification can have several unloading points
and/or goods recipients.
In particular, only one cumulation for each account assignment object is
possible and useful at purchase order item level.
As of Release 4.0, user fields are available in external services
management.
You can name these user fields, for example, 'Unloading Point' and
'Goods Recipient'.
A user field belongs to the service line and is purely informative.
Regards,
Edit
Maybe you are looking for
-
Because I can no longer open Adobe files, and have tried all obvious solutions, I've been told to defrag the Intel portion of my MacBook Pro. How do I do this? I never use the Intel side, and have never partitioned the MacBook Pro. Message was edited
-
Hello gurus.. My if conditions are maintained in a table and it will look like 00000219|001|T|SMC|04|02|EQ|O|35 00000219|002|T|SMC|04|02|EQ|O|75 first 2 rows are key fields.. These 2 entries in the the database table will convert into <b>IF SMC4(2) =
-
I want that line---file,edit,view,bookmarks,etc. to appear as soon as I begin. Thanks!!!
-
Updating to Yosemite from 10.9. Progress is stuck
I am trying to update my MacBook Pro from 10.9 to 10.10 Yosemite. The update downloaded OK. The problem is the Install progress bar has been stuck for hours. What should I do?
-
32bit Oracle ODBC Driver on 64bit RHEL 5.9 system
I am using unixODBC as my driver manager and 32 bit Oracle Client/Driver on Linux RHEL 5.9 64bit OS. I cannot seem to get a successful test with isql with 32bit ODBC Driver, i get success with 64bit ODBC Driver.