Need help in writing ABAP for and Object
Hi ,
I am an ABAPer and I need a help related to BW.
As per the Client Requirement ,I need to write ABAP for object ZC_MRPAMC.
what he expects is :
0MRP_CONTROL is an attribute of 0MAT_PLANT. There can be only one 0MRP_CONTROL per 0MAT_PLANT.
Assign the attribute value of 0MRP_CONTROL to ZC_MRPAMC per 0MAT_PLANT.
How to assign value of 0MRP_CONTROL to ZC_MRPAMC per 0MAT_PLANT.
Kindly give me the steps.
Thanks.
Anu.
Hi,
U can use FM RSAU_READ_MASTER_DATA.
Give as input the info object(I_IOBJNM=0MAT_PLANT) and attribute name(I_ATTRNM=0MRP_CONTROL).
Output u will get the value of that attribute which u want(E_ATTRVAL=ZC_MRPAMC).
Hope it helps
Regards,
Rathy
Similar Messages
-
Need helping in writing query for finding percentage of duration
Can any one please help in writing query for this.
The table is like this :-
ID Region Month Duration
I1 R1 Jan 80
I2 R2 Jan 70
I3 R1 Jan 70
I4 R3 Jan 40
I5 R1 Feb 80
I6 R2 Feb 30
I7 R3 Mar 100
I want to write a query to find
% of duration for each and every region against each and every month.
Please help in solving this query. I am in urgent need of this.
Thanks in advance.I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
Nicolas. -
Need help generating variable name for timeout object
Below is a function I am using to scale an object down and
then hide it. It works fine on just one object, but if I try to run
it on multiple objects at the same time, only the last object gets
scaled down. I believe this is because the timeout list only ever
has a single item in it, “ShrinkTimeOut”.
Does each entity in the timeout list need a distinct name?
And if so, how would I dynamically generate a name and save it so I
can kill the timeout object once the object has scaled down fully?> Does it look like I am getting rid of the timeout object
properly in my code?
Now that you mention it, and I have a look, no - it doesn't:
//not sure of the order of parameters here:
function fShrinkLoop(mModel, aTimeout) {
//Creates a variable that contains the vector value of the
model's
scale (vector( 1.0000, 1.0000, 1.0000 )).
nScaleVector = mModel.getPropRef("transform").scale;
//Checks to see if the model is 1% or less than its original
size.
if (nScaleVector[1]<=0.01) {
//Makes the model invisible.
mModel.visibility = symbol("none");
//Kills the timeout object.
aTimeout.forget();
} else {
//If it is not, we scale the model down further and allow
the loop to
repeat.
mModel.scale(0.9); -
Need help with java file scanner and objects
Hi, i've got an assignment that asks me to do these, but i cant seem to get around in solving it. Any help will be much appreciated. TYVM!
Create a class called TVProgram that can store some important details of a television program:
- name of the show
- the channel the show is on
- the start time (in 24-hour format)
- the end time (in 24-hour format)
Write a program that uses this class.
Your program will read a list of TV programs, making up a schedule for an evening's TV: for you convenience, you will be able to download a sample file listing. The listing will consist of one line for each of the above fields, in the above order, for each program, followed by a line containing only the "#" character. For example, here is the start of such a file.
At the Movies
ABC
1800
1830
The Einstein Factor
ABC
1830
1900
Your program should start with a little menu to prompt whether to read from standard input or a file:
Please choose a number for the way you will input the TV schedule:
1. Read from standard input
2. Input from a file
Your program should first read the complete schedule, then loop through all the programs in the schedule and prompt the user as to whether they want to record the program or not. For example, the program should print:
At the Movies is showing on ABC from 1800 to 18.30.
Do you want to record it: type Y or N.
If the user types Y then the program sets this T Vprogram to be recorded. If the user types N, the program goes to the next entry and prompts the user again. If the user types something other than a Y or N (or y or n), then the program should prompt for a proper answer:
Do you want to record it: type Y or N.
Once the complete schedule has been shown to the user, the program loops through those that the user has said they want to record and checks for any clashes---i.e. any times at which the user wants to record two programs at the same time. For any clashes, your program should show these to the user and insist that only one be selected for being recorded. For example:
At 1830 you want to record both 1. The Einstein Factor on ABC and 2. The Biggest Loser on Ten.
Please pick option 1 or 2 to record.
Again, if the user selects an option other than 1 or 2 in the above, then the program should make the user to make another selection until they type a legal value.
If the schedule is in time-start order (see "Assumptions" below), then a simple way to check for clashes is:
- as you loop through the schedule of shows, keep track of the latest end-time the user wants to record;
- if any program the user says they want to record has a start-time before this latest end-time, then this is a clash.
There are different ways to keep track of clashes: you can keep an array (a list of clashes) of arrays (each of these is the list of clashing programs); you could create a Clash class.
Finally, after going through all clashes, print out the list of programs that the user still wants recorded.
Here is the list of programs that will be recorded for you:
From 1830 to 1930, The Biggest Loser, on Ten.
From 1930 to 2030, Who Do You Think You Are, on SBS
-----* @(#)TVProgram.java
* @author Okky Satya
* @version 1.00 2008/3/29
import java.util.*;
import java.io.*;
public class TVProgram {
private String name;
private String chnl;
private int strt;
private int ends;
public TVProgram(String showName, String channel, int start, int end ){
this.name = showName;
this.chnl = channel;
this.strt = start;
this.ends = end;
public static void readFileInput() {
List prog = new ArrayList();
Scanner inputFile = null;
try
inputFile = new Scanner(new File("tv_schedule"));
catch (FileNotFoundException fe)
System.out.println("File not found!");
System.exit(0);
while(inputFile.hasNext()== true){
while (inputFile.nextLine()!="##")
new TVProgram;
public static void readInput(){
public static void loopInput(){
public static void showList(){
public static void checkUserList(){
public static void main(String[] args){
int menuChoice = 0;
System.out.println("Please choose a number for the way you will input the TV schedule:\n 1. Read from standard input\n 2. Input from a file");
switch(menuChoice){
case 1:
readInput();
break;
case 2:
readFileInput();
break;
loopInput();
checkUserList();
showList();
} -
Need help in writing ABAP Code
Hi All,
I have a scenario to write a code for below requirement to fetch a latest sales document based on Last Date of Change and Last Time Change and I have written below code in the transfer rule..
SORT datapak BY Sales Doc
Last Date of Change Last Time Change descending.
DELETE ADJACENT DUPLICATES FROM DATAPAK
COMPARING Sales Doc
The above code works as per below details
Data is coming from source in FULL mode
Data in Source: Input
Sales Doc Last Date of Change Last Time Change Order Reason
201 01/03/2014 04:10:00 A
201 01/03/2014 05:12:00 B
Output: Data in DSO(after moving from transfer rule)
201 01/03/2014 05:12:00 B ------------------This is correct(record based on latest date of modification and time)
Data in source
Sales Doc Last Date of Change Last Time Change Order Reason
201 01/03/2014 04:10:00 A
201 02/04/2014 05:12:00 B
Data in output
201 01/03/2014 04:10:00 A
201 02/04/2014 05:12:00 B -------------------------In this case code is not working when Last date of Modification is different, the DSO fetches both the records while it should fetch only record with latest Date of Modification and Time....
Could you pls advice if the code is correct or any changes to be made to the code..Hi Antony,
Here the problem is of SORT statement when the Time has been introduced as the sorting factor.
Please apply below additional code and it will do the job for you.
*Additional Code
DATA: ls_datapak LIKE LINE OF datapak.
DATA: ls_datapak1 LIKE LINE OF datapak.
* First sort the datapack with only last change date
SORT datapak BY vbeln aedat DESCENDING.
* remove all the old dates first and keep only the latest change date in DATAPAK
READ TABLE datapak INTO ls_datapak1 INDEX 1.
LOOP AT datapak INTO ls_vbak.
IF ls_datapak-aedat LT ls_datapak1-aedat.
DELETE datapak INDEX sy-tabix.
ENDIF.
ENDLOOP.
* below is your code
SORT datapak BY vbeln aedat lastchangetime DESCENDING.
DELETE ADJACENT DUPLICATES FROM datapak COMPARING vbeln.
Please let me know if you face any issue with this code.
Thanks
Amit -
Need help on XSD mapping for multiple objects
Hi All,
I am having a table in which row1.column1 data is mapped with xyz atttribute from XSD which is having multiple occuraces.
Same attribute is mapped with row2.column1.
But ro3.column1 data is not getting displayed completly only few data is gettin displayed.
Example
<MYXML>
<EMP>
<name>a1</name>
<address>usa</address>
<age>20</age>
</EMP>
<EMP>
<name>a2</name>
<address>canada</address>
<age>21</age>
</EMP>
<EMP>
<name>a3</name>
<address>india</address>
<age>22</age>
</EMP>
</MYXML>
here row1.column1 mapped with name
row1.col2 mapped with address
row2.col1 mapped with name
row2.col2 mapped with age
Please help for the same.Mohit,
Here is a sample file for your use..
https://acrobat.com/#d=urni5MvK7Fx87liMbRpPgQ
I used the below XML as data connection as well as Preview Data..
<?xml version="1.0" encoding="UTF-8"?>
<MYXML>
<EMP>
<name>a1</name>
<address>usa</address>
<age>20</age>
</EMP>
<EMP>
<name>a2</name>
<address>canada</address>
<age>21</age>
</EMP>
<EMP>
<name>a3</name>
<address>india</address>
<age>22</age>
</EMP>
</MYXML>
Thanks
Srini -
Re: Beginner needs help using a array of class objects, and quick
Dear Cynthiaw,
I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.
I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ? In html, I assume. How did you generate the html code of your three classes ? By help of your IDE ? NetBeans ? References ?
I already posted my question with six source code classes ... in text mode --> Awful : See "Polymorphism did you say ?"
Is there a way to discard and replace a post (with html source code) in the Sun forum ?
Thanks for your help.
Chavadachavada wrote:
Dear Cynthiaw,
I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.You think she's still around almost a year later?
I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ?Just use [code] and [/code] around it, or use the CODE button
[code]
public class Foo() {
* This is the bar method
public void bar() {
// do stuff
}[/code] -
I need help to master ABAP.
Please email me....if u can help me : [email protected]
I am looking for help with IDOC, ALE, RFC and BAPI.
Please send me mail. We can talk more.Jeff, please ask specific questions here. The answer will come. Try to not ask for material to be sent directly to you. This is not in the community spirit as it will only benefit you. Also you might want to try the search functionality on this site. There is plenty of info out there.
Regards,
RIch HEilman -
Need help in writing data from JSP to excel
Hi ,
I need help in writing the data from JSP to excel.I somehow able to retrieve the data into excel but unable to get the required format.
For eg: The amount should be displayed in 0.00 format .when i am exporting it to excel it is displaying as 0 :( .
I am using the following code in JSP.
"out.print(amt + '\t');"
Would like to know if there is any otherway where in i can get my requirement.
Thanks
TomHi,
Try using format part of the JSTL tag libs.
Syntax :
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:formatNumber value="40" pattern="$#,##0.00"/>
I need help in writing the data from JSP to excel.I
somehow able to retrieve the data into excelHow do u convert the jsp to excel?
One way to convert the jsp page to excel, is to render it as an excel appl instead of html. Set the content type of the response to application/ms-excel.
response.setContentType("application/ms-excel")Hope this Helps.... -
Need help with my iPhone 5 and my Macbook Pro.
Need help with my iPhone 5 and my Macbook Pro. I was purchased some music on itunes at my mac. Some reason I deleted those music from both on Mac and iPhone 5. Today, I went to my iPhone iTunes store inside of iCloud to redownload my puchased. But those song won't able to sync back to my iTunes library on my Mac. Can anyone help me with that ??....
iPhone 5, iOS 6.0.1You've posted to the iTunes Match forum, which your question does not appear to be related to. You'll get better support responses by posting to either the iTunes for Mac or iTunes for Windows forum. Which ever is more appropriate for your situation.
-
TS4268 I need help getting my face time and imessage to work.
I need help getting my face time and imessage to work. It is saying wating for activation. I just got my iphone 5 2 days ago. I have reset it from the phone and from itunes on the computer, made sure I'm attached to wifi.
The 3 basic troubleshooting steps are these in order: 1. Restart your iphone 2. Reset your settings/iphone 3. Restore your iphone. Since your iphone is only a couple of days old, you should backup your device before restoring. If you don't have anything on your iphone that you care to lose, then simply restoring without a backup is fine. A quick reset of pressing the sleep/wake button (top of iphone) and your home button simultaneously and holding it until the silver Apple logo appears.
-
Need help in developing BADI for IT0001
Hi All,
I need help in developing BADI for IT0001.
On IT0001 create or change, there is need to update IT0017 with following data from IT0001
-Company Code
-Cost center
-Business Area
-Begin and End Date.
Other fields from IT0017 need to be derived from Position and update in IT0017.
Please guide me how I can address this. I do not want to go for dynamic action, as it is not getting evoked during background jobs.
I am new to BADI development and will appreciate step by step instructions.
ThanksHi,
follow the below steps to achive
Steps:
1. Execute Business Add-In(BADI) transaction SE18
2. Enter BADI name i.e. HRPAD00INFTY and press the display
button
3. Select menu option Implementation->Create
4. Give implementation a name such as Z_HRPAD00INFTY
5. You can now make any changes you require to the BADI within this
implementation, for example choose the Interface tab there are 3 methods avialble
6. Double click on the method you want to change, you can now enter
any code you require.
7. Please note to find out what import and export parameters a
method has got return the original BADI definition
(i.e. HRPAD00INFTY) and double click on the method name
for example within HRPAD00INFTY contract is a method
8. When changes have been made activate the implementation
<b>Reward points</b>
Regards -
ALV using ABAP Classes and Objects
Hi All,
I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here the title for columns are picked based on the title specified in the data element. I want to set the title of my columns by my own. how to achieve this ?. Please provide me a sample code if possible.
thanks & regards,
Navneeth.KHello Navneeth
The following sample report shows how to build and modify a fieldcatalog (routine <b>BUILD_FIELDCATALOG_KNB1</b>).
*& Report ZUS_SDN_ALVGRID_EVENTS
REPORT zus_sdn_alvgrid_events.
DATA:
gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_col_id TYPE lvc_s_col.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CASE e_column_id-fieldname.
WHEN 'KUNNR'.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'ERNAM'.
* SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
* NOTE: no parameter id available, yet simply show the priciple
CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
WHEN OTHERS.
* do nothing
ENDCASE.
* Set active cell to field BUKRS otherwise the focus is still on
* field KUNNR which will always raise event HOTSPOT_CLICK
ls_col_id-fieldname = 'BUKRS'.
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
is_row_id = e_row_id
is_column_id = ls_col_id.
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
CHANGING
it_outtab = gt_knb1
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog_knb1 .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT gt_fcat INTO ls_fcat
WHERE ( fieldname = 'KUNNR' OR
fieldname = 'ERNAM' ).
ls_fcat-hotspot = abap_true.
ls_fcat-scrtext_s = '<short text>'. " short text of column
ls_fcat-scrtext_m = '<medium text>'. " medium text of column
ls_fcat-scrtext_l = '<long text>'. " longtext text of column
ls_fcat-tooltip = '...'. " ALV control: Tool tip for column header
ls_fcat-coltext = '...'. " ALV control: Column heading
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
Regards
Uwe -
i am john and I need help downloading a progmmme yesterday and wanted to finish downloading open it and I am not told me that the program was shut down unexpectedly and restart ponia not opened and went back to download it and not opened my back probe to turn off the computer and there was no case
i am john and I need your help yesterday bought a program called DJAY when I finish the download and got an error opened and I saw him there was no case to install and thank you for your help anyway
-
I need help integrating Microsoft Office, Outlook and Calendar with my job and is it possible
Ok guys I am new to the iphone 4s. I just dumped my Blackberry after 10 years. I need help integrating Microsoft Office, Outlook and Calendar with my job and is it possible? Also I need it to automatically push email and appointments to my phone? I will buy any app just need to know which is best for work environment. Here is what I am thinking about doing. http://www.groovypost.com/howto/apple/sync-iphone-or-ipod-touch-calendar-and-con tacts-with-google/ Is this the best way? For personal use I am using paid G whiz app
I use Google Calendar Sync to sync my work Outlook calendar to a gmail account, then sync that to my iPhone. It works well for me for the past couple of years.
As far as mail itself, just ask your it folks for settings for remote access to your exchange account, and then set it up on the phone.
As far as working with Office docs, to be able to actually edit them and such, look in the app store for DocsToGo or QuickOffice - they both are good but each has it's pros and cons, so on balance it's down to mere preference i think.
Maybe you are looking for
-
Coldfusion 11 Running on IIS Server and Java CreateObject Error
I am getting the error below when trying to create an object in CF 11 using cfscript. In the CF Admin Java VM settings are the default setting. I have placed xmlsec-1.5.8.jar file under \cfusion\lib and cfusion\wwwroot\WEB-INF\lib I have also restart
-
Vendor Master Adress Field Missing
Hi Gurus, The Field Street 4 is not coming while taking the Dump in LFA1 and in T Code: S_ALR_87012087 - Address List And also suggests how to get the data. Thanks, nandu
-
FLV video in a single keyframe.
hello, I have loaded an external FLV video into my project however, my video starts immediately as soon as I go to the keyframe with the video on it. It can still be heard playing after I leave that keyframe. Should I return to the keyframe it begins
-
Web.showdocument javascript:window.open
WEB.SHOW_DOCUMENT ('javascript:window.open("http://www.google.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank'); syntax doesn't work on web forms on forms9i what could be the reason
-
How much bandwidth netflow export uses
Experts, I tried searching doc on cisco and even googled for information on how much bandwidth netflow export uses; however I didn't find any convincing article. I also found lancope.com where they estimate the BW required, but still I was not satisf