How to insert code in ABAP program ( Z program) by ABAP coding.
Hello,
In ABAP is there any way to insert some code lines into an existing ABAP program (Z*) , We will insert in masse some code lines into a liste of program automatically ?
Thanks in advance
Hi,
This thing you can achieve by using the Code Template . If you are using New ABAP editor you can in the bottom right side after the scrolling bar. Click on that add the code you need to insert .
Hope this might help you.
With Regards,
Sumodh.P
Similar Messages
-
Hi All,
I'm creating a Query to extract the data from EKKO, EKPO and EKKN.
here I have to insert a piece of code as checking below.
IF EKPO-KNTTP ne ' '. "not equal to blank
extract the data from table EKKN.
ENDIF.
here I need your help like how to write this code in a Query or Functional Area (Info Set).
Thanks,
Sunil Bodda.Duplicate POST.....
select the query and go to QUERY in the menubar then goto more functions where you have an option display report name it will give you the report name.
Menubar ---> Quer ---> MoreFunctions ----> Display Reportname.
Goto SE80/SE38-->Report name and add the Codes in the program.
Regards,
gurpreet -
How to insert code conditions ina QUERY
Hi All,
I'm creating a Query to extract the data from EKKO, EKPO and EKKN.
here I have to insert a piece of code as checking below.
IF EKPO-KNTTP ne ' '. "not equal to blank
extract the data from table EKKN.
ENDIF.
here I need your help like how to write this code in a Query.
Thanks,
Sunil Bodda.
Edited by: sunil bodda on Apr 15, 2009 12:05 PMHi Sunil,
You need to code it in infoset. follow the steps below.
1. Goto SQ02, enter your infoset.
2. Click on "Extras" button(above find button). On the next page you will find a "Code" tab.
3. Declare a constant as space. choose DATA in the drop down for coding section.
4. Choose "Record processing" or if any other appropriate choice from the drop down in the coding section.
5. CHECK EKPO-KNTTP EQ c_space. and write your code here.
Hope this helps. -
My just-finished site will depend on newletters & opt-in subscribers, & I've started with one of those email managers (Campaigner.com). Uploaded my iweb-made Contact Us page locally onto my browser & it still comes out as their html gibberish.
Was told by their support "You have to insert this coding in the **coding version of your application.** (??) I tested it and it works fine. Where did you insert it?"
iWeb seems to have no "code box" where you can add the code.
But. I found this conversation where they're discussing the same iWeb problem.
http://forums.macosxhints.com/archive/index.php/t-56252.html
I don't have Textwrangler, I have TextEdit.
Any help would be so appreciated.The "code box" in iWeb is the HTML Snippet.
You can paste custom code there.
iWeb provides the placeholder, but does nothing to your code. You are responsible.
[TextWrangler|http://www.barebones.com/products/textwrangler>
Working with TextEdit:
[Working with HTML in TextEdit|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te1003.ht ml]
[Opening an HTML document|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te48.html ]
[How to Set Up TextEdit as an HTML or Plain Text Editor|http://docs.info.apple.com/article.html?artnum=106212]
[I can't view the code in an HTML file|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te1007.html]
[Saving HTML files|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te58.html] -
How to insert code with Change Pointers (BATMAS)
Hello,
We make use of change pointers to notify our customer of changes on batches (BATMAS).
I would like to update a segment-field in the IDoc before sending it.
Is this possible?
And if Yes, where can I do this?
Thanks in advance!
Guido VerbruggenThe "code box" in iWeb is the HTML Snippet.
You can paste custom code there.
iWeb provides the placeholder, but does nothing to your code. You are responsible.
[TextWrangler|http://www.barebones.com/products/textwrangler>
Working with TextEdit:
[Working with HTML in TextEdit|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te1003.ht ml]
[Opening an HTML document|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te48.html ]
[How to Set Up TextEdit as an HTML or Plain Text Editor|http://docs.info.apple.com/article.html?artnum=106212]
[I can't view the code in an HTML file|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te1007.html]
[Saving HTML files|http://docs.info.apple.com/article.html?path=TextEdit/1.4/en/te58.html] -
How to insert abap code in LSMW generated program?
hi,
i m working on LSMW for loading data in SAP
i would like to insert abap code into the generated program....
it's because i have 1 BKPF segment (header data), 2 BSEG segments, but i cannot define rules by customizing for the second BSEG segment(LSMW doesn't permitt).
i already tried to insert code directly into the program, but obviously it disapears at each time i generate the program.
i saw that apparently a code insertion has already be made into this program and the subject of this insertion is to define rules for the second BSEG (exactly what i want to do....) and this modification doesn't disapear at new prog generation.....
Any idea ?Hi
Why dont you use the FORM provided by LSMW
To use this please do the following
1.Goto option <b>Maintain Field Mapping and Conversion Rules</b>
2.Goto menu <b>EXTRAS->LAYOUT->Form Routines</b>
Here you will now get many options like
Global Data
Begin of Transaction
Begin of Processing
Begin of Record
like wise the End of these also.
Please put a breakpoint and check where you want to insert your code.
Note:
This is only for the Conversion Program and does not affect the main program used to update the Standard Tables
Hi , I was reading your earlier post .. It seems that you have worked on EMIGALL. Consider a similar situation, it is like writing the code in the events till CALL01...
Thanks
DOminic
Message was edited by: Dominic Pappaly -
How to insert Method in ABAP code
Hi Gurus,
Plz tell me how to insert a METHOD in ABAP code as we do in the case of inserting function in ABAP code using PATTERN.Button
Rgds
rajeshHi,
Try this.
Click pattern tab ans select AABAP object patterns.
Select call method.
Then give the instance name , class/interface name and the method name.
Sharin. -
Insert code in prgram to check sales order exits in your own program
Hi Experts
I want to insert a coding in IDOC , can anyone write in abap coding and show .....The program is to check if sales order for category PSTYV ( CATEGORY ) for items ...
if found set flag true else set flag false...
Eg
clear flag
insert code
to check s/o for ZTAC item found
if found
set flag = true
else
set flag = false
So how can I write a a code in ABAP
Thanks in advanced
PirozHi Fracis
Thanks for your advice I did in this way , Is there any correction required
form look_sap_saleord using p_in_string
p_material_in " Material No exits
p_site_in " plant
changing p_out_saleord_e " sales order
p_out_material_e " Mat No
p_out_order_e " Prod Order
p_out_wemng_e " QTY goods received for order item
p_out_psmng_e. " Ordered Qty Item
data: lva_prodord like afpo-aufnr, " Production Order
lva_prodmat like afpo-matnr, " Material Number
lva_saleord like vbkd-vbeln, " Sales Order
lva_pstyv like vbap-pstyv, " Category
lva_wemng like afpo-wemng, " Quantity of goods received for the order item
lva_psmng like afpo-psmng, " Ordered Qty Item
lva_count type i. " counter validation
CHECK FOR SALES ORDER IN VBAP IF EXITS
GO TO DELIVERES
ELSE CHECK REQUIRED PRODUCTION ORDER
ihrez_e Ship to party
check single if the sales order exits
select vbeln from vbkd into vbkd-vbeln
where ihrez_e eq p_in_string.
Is the sales order exits for ZTAN Category ?
select vbeln from vbap into vbap-vbeln
where vbeln eq vbkd-vbeln and
werks eq p_site_in and
matnr eq p_material_in and
pstyv = 'ZTAN'.
The sales order is for the specified plant.
lva_saleord = vbap-vbeln.
lva_prodmat = vbap-matnr.
exit.
endselect.
when an order for this plant has been found.
if not lva_saleord is initial.
exit.
endif.
endselect.
check not lva_saleord is initial.
select count(*) into lva_count from vbap
where vbeln = lva_saleord.
if lva_count eq 1.
select vbeln matnr aufnr pstyv
into (lva_saleord, lva_prodmat, lva_prodord, lva_pstyv) from vbap
where vbeln = lva_saleord and
matnr = p_material_in and
pstyv = 'ZTAN'.
exit.
endselect.
else.
select vbeln matnr aufnr pstyv
into (lva_saleord, lva_prodmat, lva_prodord, lva_pstyv) from vbap
where vbeln = lva_saleord
and matnr = p_material_in.
exit.
endselect.
endif.
move: lva_saleord to p_out_saleord_e, " sales order
lva_prodord to p_out_order_e, " production order
lva_prodmat to p_out_material_e, " material no
lva_psmng to p_out_psmng_e, " QTY Ordered
lva_wemng to p_out_wemng_e. " Qty Received goods
lva_wemng to p_out_wemng_e. " Quantity of goods received for the order item
endform. " look_sap_sales ord
Regards -
How to pass table data to brf plus application through abap program
Dear All,
i have a question related to BRF Plus management through abap program.
In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
And my question is
1) How to pass fields to BRF Plus application from abap program.
2)How to pass Table data to BRF Plus application from abap program.
3)How to pass Structure data to BRF Plus application from abap program.
4)How to get the result data from BRF Plus application to my abap program.
And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
How do i get the code automatically when calling the function in brf plus application.
Regards
venkata.Hi Prabhu,
Since it is a Custom Fm i cant see it in my system.
Look if u want to bring data in internal table then there could be two ways::
1) your FM should contain itab in CHANGING option , so that u can have internal table of same type and pass through FM,
2) read values one by one and append to internal table.
Thanks
Rohit G -
How to insert the image or logo into the table as a field in webdynpro abap
Hi Friends,
Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........Hi Alagappan ,
In your view layout you take table UI element and then you bind it with some context nodes.
The attributes of your nodes comes as a field.
Now in these fields you can set various properties and image is one of them.
Go to ->
1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
2. Right click on table -> Create Binding.
Here you have to bind it with the appropriate context node.
You will get two properties here
a- Standard Cell Editor :- ( make it image )
b- Standard properties :- ( If required set image properties ).
3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
also have a look :-
[Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
Hope this will solve your problem.
Reply if any case of any issue.
Thanks & Regards,
Monishankar C -
How to read card reader (bar code reader) in simple java program ?
hai all
how to manipulate (read/write) card readers (or bar code reader ) in
a java program ?
should i import any particular package library ?
pls give me any sample code or tutorials or tools, etc (whatever you have) .
i am new to this card reader category
its very urgent
thank you .Nearly all card readers and barcode readers I've ever seen simply stick their input right onto stdin, so you can capture it just as if it had been typed in on a keyboard
-
How to insert record inside the internal table in below code
Hi all,
My requirement is to find the sub-total and need to insert in between the internal table.
You can see the output ....where I want the sub-total F2 when 1 & 2 combindely , 3 , 4& 5 combindely .Please check it and let me know is it possible
when i am using modification it is not creating extra row inside the table instead it is modifying one row and putting the total there.
For ex: the origianl output is
F1 F2 F3
A 1 1
B 1 1
F 2 1
D 3 1
E 4 1
C 5 1
We want to display all the total of f2 of 1-2 , 3 , 4-5
so expcected output is
F1 F2 F3
A 1 1
B 1 1
F 2 1
* 3 ->This is the sub-total of 1& 2 of f2
D 3 1
* 1 ->this is the sub-total of 3
E 4 1
C 5 1
* 2 -> this is the sub-total of 4 & 5
= space
But coming output is
A 1 1
B 1 1
* 3 -> it is modifying the F row and inserting the total .Total is comong correct but is shoule insert instead of modifying the record!!
* 1
E 4 1
* 2
Please help how to insert the row total at the end of the chage of field
Please find the below code ..Due to space problem i am attaching below
SasHere is the solution ....i Got the answer Thanks for your helping hands friends
REPORT YTEST_MODIFY.
DATA: BEGIN OF ITAB OCCURS 1,
TOT TYPE C,
F1 TYPE C,
F2 TYPE C,
F3 TYPE I ,
END OF ITAB.
DATA: BEGIN OF JTAB OCCURS 1,
F1 TYPE C,
F2 TYPE C,
F3 TYPE I ,
END OF JTAB.
START-OF-SELECTION.
ITAB-F1 = 'A'.
ITAB-F2 = 1.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'B'.
ITAB-F2 = 1.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'C'.
ITAB-F2 = 5.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'D'.
ITAB-F2 = 3.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'E'.
ITAB-F2 = 4.
ITAB-F3 = 1.
APPEND ITAB.
ITAB-F1 = 'F'.
ITAB-F2 = 2.
ITAB-F3 = 1.
APPEND ITAB.
SORT ITAB BY F2.
LOOP AT ITAB.
WRITE:/1 ITAB-F1 ,
8 ITAB-F2 ,
10 ITAB-F3 .
ENDLOOP.
LOOP AT ITAB.
IF ITAB-F2 = 1 OR ITAB-F2 = 2.
ITAB-TOT = 1.
MODIFY ITAB.
ELSEIF ITAB-F2 = 3.
ITAB-TOT = 3.
MODIFY ITAB.
ELSEIF ITAB-F2 = 4 OR ITAB-F2 = 5.
ITAB-TOT = 4.
MODIFY ITAB.
ENDIF.
ENDLOOP.
SKIP 2.
SORT ITAB BY TOT.
DATA : L_SUM(2) TYPE C,
L_ROW(2) TYPE C.
LOOP AT ITAB.
MOVE-CORRESPONDING ITAB TO JTAB.
APPEND JTAB.
L_SUM = L_SUM + ITAB-F3 .
AT END OF TOT.
CLEAR JTAB.
JTAB-F3 = L_SUM .
APPEND JTAB.
CLEAR L_SUM.
ENDAT.
ENDLOOP.
LOOP AT JTAB.
WRITE:/1 JTAB-F1 ,
8 JTAB-F2 ,
10 JTAB-F3 .
ENDLOOP.
* DATA: a TYPE i , b .
* LOOP AT itab.
* IF b = 0.
* a = a + itab-f3.
* ENDIF.
* AT END OF tot.
* MOVE space TO itab-f1.
* MOVE space TO itab-f2.
* MOVE a TO itab-f3.
* MODIFY itab .
* CLEAR a.
* b = 1.
* ENDAT.
* b = 0.
* ENDLOOP.
* LOOP AT itab.
* MOVE-CORRESPONDING itab TO jtab.
* APPEND jtab.
* ENDLOOP.
* ULINE.
* LOOP AT jtab.
* WRITE: / jtab-f1 , jtab-f2 , jtab-f3.
* ENDLOOP. -
How to insert a shoutbox and a counter in a flash file with html code?
How to insert a shoutbox and a counter in a flash file with
html code?
Code shout box
<!-- BEGIN MYSHOUTBOX.COM CODE -->
<iframe src="
http://489676.myshoutbox.com/"
width="152" height="300" frameborder="0"
allowTransparency="true"></iframe>
<!-- END MYSHOUTBOX.COM CODE-->
Code compteur
<script type="text/javascript" src="
http://www.123compteur.com/counterskinable01.php?votre_id=268303"></script><noscript><a
href="
http://www.123compteur.com"
target="_blank">compteur</a></noscript>thx =D
-
How to insert Logo in module pool programming
Plz any one can explain me that how we will inseart Logo on screens by using module pool programming (in GUI programming) .
Hello.
I'll give you an example of inserting a personal photo in UI programming. Hope it helps you.
First of all, in your screen (painter), insert a custom control and give it a name (PHOTO in my example).
Then, in your screen PBO, insert a coding like this:
CLEAR handle.
CALL FUNCTION 'HR_IMAGE_INIT'
EXPORTING
p_pernr = pernr
p_tclas = 'A'
container = 'PHOTO'
IMPORTING
handle = handle
EXCEPTIONS
no_document = 1
internal_error = 2
OTHERS = 3.
CALL FUNCTION 'HR_IMAGE_SHOW'
EXPORTING
p_pernr = pernr
p_tclas = 'A'
handle = handle
EXCEPTIONS
invalid_handle = 1
no_document = 2
internal_error = 3
OTHERS = 4.
Regards.
Valter Oliveira. -
How to write code to insert record in database programtically in Jdev rel
Hi Experts,
Please tell me how to write code to insert record in database programtically in Jdev rel .2.
Thanks
Shiv NareshTo insert the record programmatically i will provide you some sample below
ViewObject vo = this.getVoXXXX();
Row vor = vo.getCurrentRow(); // get the current row of the record
ViewObject vo1 = this.getvoYYYY();
Row vor1 = vo1.createNewRow(); //creating new row in the table
vor1.setAttribute("aaaaa",vor.getAttribute("ttttt")) // In this we are getting the current row value of "ttttt" and inserting into "aaaaa"Hope this could help you!
Maybe you are looking for
-
Problem Uploading. Cant view on internet?
I am hosting through inmotion. I connected to the server successfully. i uploaded everything and it goes through the upload process with no errors. My remote server says it has all the information on it. But when i goto my domain name nothing has bee
-
When I open my Colour Picker, the middle block (which normally shows the colour in a gradient of shades) is just a solid colour depending on which H, S, B, R, G, B I have selected. How do I revert it back to normal?
-
CE Flash files always start at the beginning?
I have had an online Continuing education course designed, which has the main contents embedded into .asp pages. The problem is that when customers "log-out", then return and "log in" again whithout closing thier browser, the fllash file always start
-
I as many others are keen to get a high speed connection and live in a semi rural area (Longfield in Kent). On checking the exchange status last year a date was set for availability of December 2011. This was then revised in January to March 2012, th
-
Premiere Elements hangs or crashes when importing .avi files
When making videos, I use .jpg and .avi files, since that's what my digital camera produces. Lately, if I start a new project, I can load the .jpg's, but when I attempt to load a .avi, the program (Premiere Elements 1, Windows XP, sp3) hangs. If I tr