Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

"dynamic" variable

$
0
0

Dear experts,

 

I have an cust. table where once per week from 1 to 3 different values will be written.

 

Currently I have 3 variables for each table field and I do following:

 

SELECT *

   FROM zdyu_vstel

      INTO CORRESPONDING FIELDS OF TABLE ta_dyu_vstel.

 

LOOP AT ta_dyu_vstel

    INTO wa_dyu_vstel.

   IF sy-tabix = 1.

     v_vstel_1 = wa_dyu_vstel-vstel.

   ENDIF.

   IF sy-tabix = 2.

     v_vstel_2 = wa_dyu_vstel-vstel.

   ENDIF.

   IF sy-tabix = 2.

     v_vstel_3 = wa_dyu_vstel-vstel.

   ENDIF.

ENDLOOP.


Could you give me some advise how I can use just one variable in my program which would loop the table and in depends of the ammount of the fields buil itself containing every unique field?


Thank you in advance.


Error trying to install sapinstgui.exe

$
0
0

Hi Experts, I'm trying to install the all enviroment to learn abap so I downloaded the Sap Netweaver trial... but when I try to install the sapinstgui.exe I get this

 

error.png

The port 21200 is not in use..

 

 

Hope someone can help me with this..

 

Thanks in advance

Text Elements

$
0
0

Hi All,

       

         I am writing a select statement as shown below.Even though I maintained text element for 009 as 'A' but when I double click on below line it shows me as 009 not found.Why? How can I rectify it.Thanks in Advance.

 

         

 

 

Best Regards,

Chakradhar.

How to regenerate TMG?

$
0
0

Hi all,

 

I have added a field in a ztable that table has TMG with earlier fields.Now the new filed also need to show is TMG.

Deleting the existing TMG is only solution or how to do it?  the present data remains same should not lose.

 

Thanks in adv.

 

Regards,

Raj....

Summation of automatically in alv fields

$
0
0

Hello guys,

I want to add summation of fields to last row in my alv table.

 

Like this:

DipToplam.png

 

Thank you for everyone.

Regards,

Enhancement for ME21N t-code ?

$
0
0

Dear ABAP Experts..,

 

        I have a requirement that in ME21N t-code Delivery / Invoice tab there is a field called Payment Terms. If user select Payment Terms as '0010'

then he wants to new screen which have different entries .

 

     How can i do this issue when the user is selected Payment Terms as '0010' to generate new Tab in header part ?

 

  

 

 

Thaks & Regards.

K. Chinna..!

Dynamic Date Calculation

$
0
0

  Hello,

 

 

I am trying to run a program twice a month, on the 1st and on the 15th.

 

I am setting up two separate variants.

 

The first variant needs to collect information from the 16th of the previous month up until the time runs at 23:59

 

The second variant needs to collect data from the 1st to 23:59 on the 15th of the current month.

 

 

I tried looking for a parameter that allows these conditions, but it seems to only be linked to working days.

Upload/Download files From UI5 Using SAP EasyDMS not in SAPGUI

$
0
0

Hi Experts,

 

My requirement is to upload a pdf/image or any file to dms, Tested it from BAPI's(BAPI_DOCUMENT_CREATE2) which are available in SAP where I can upload and download pdf/images or from the presentation server.


can you put some lights on how we can do it from third party system.what are the conversions formats which we need to follow, please provide some inputs.


SAP ABAP COGs

$
0
0

Hello All,

 

Can someone direct me to any documentation about COGs from SAP? I am trying to find everything there about COGs and the relationship it has to SAP. For instance, what values are included in the COGs data? Any help is appreciated.

 

Thanks.

Automatically Generate Data Declarations While Inserting FM or Method Call

$
0
0

Summary

There is a very important time-saving ABAP Editor setting that enables data declaration of actual parameters when calling a function module (FM) or class method. The setting should work fine on ABAP release 731 and above.

After enabling the setting, call pattern for FM would look like this:

 

 

Call pattern of class method would look like this:

 

 

The settings can be found in ABAP Editor > Utilities > Settings > ABAP Editor > Editor > Pattern

 

 

 

Story

I had seen the setting about 1 year ago on 701 release but the meaning was not so obvious. Enabling the setting did nothing on that release.

The text ( Name Actual Parameter Same as Name Formal Param. ) does not suggest that the actual parameters will be declared automatically.

F1 help or verbatim Google search returned 0 hits.

 

This 4 years old blog explains how to insert custom pattern (FM and data declarations) using ABAP Editor exit.

Call a function module in the ABAP Editor: Stop Crying - Start Laughing.

This ready-made solution was luckily present in my work environment. Excited by the thought of saving so much time, I started using the editor exit.

 

My work environment changed some time back ( different system having 731 release ) and the custom pattern was no longer with me.

I missed the functionality but didn't install the code due to:

  1. Laziness - It is a selective thing. When it comes to touch typing, I am not lazy at all.
  2. Reluctance - Basis/Security might question me if dumps came due to that exit.

 

Couple of days ago I finally installed the editor exit. Nowadays I am trying to use methods instead of forms. As an exercise, I thought of understanding how the code works so that some day I'll replace all forms with methods and probably improve the code using newer ABAP features.

 

The custom code reads FM's formal parameters, determines the types, generates code for data declaration and then generates code for FM call. I thought to see how the standard generates FM call and reuse that code if possible. While debugging standard Call Pattern > Call Function, I found that there is an FM to generate the FM call. After generating the FM call code, there was additional code enclosed in IF condition. It really looked like the code is present for data declaration but it is not getting called.

 

 

The IF condition was on field of table RSEUMOD, which stores user specific ABAP workbench settings. This meant the setting can be activated somewhere in ABAP Editor settings. Added bonus was that similar setting is present for class methods too, which my custom editor exit didn't do. I tried out same thing on 701 release ABAP trial and found that even though the setting is present in options, there is no corresponding code to do something with it.

 

This is how I came to know about the setting while debugging standard code.

 

Some Notes

  1. I am also using the option " Functional Writing Style for Call METHOD " . Functional-style method calls help reduce the lines of code and can be used in functional expressions. For example, try creating pattern for get_instance( ) method of some class. Generated code would have actual parameter on left hand side and functional method call on right hand side.
  2. You can export the ABAP Workbench settings to PC so that it can be imported by your colleagues.
  3. The custom pattern uses magic word *$&$MUSTER. Muster is German for Pattern.

cl_gui_chart_engine - chart very small, not readable

$
0
0

Good morning all,

i have an abap program that is working correctly for a number of user (almost all) but for some users, the graph is very scrunched and not viewable. i have an example attached.

 

i have been searching and haven't found anything specific to this issue. i have also searched service marketplace without any luck.

 

we have:

sap_basis 731 sp 0007

sap_aba  731 sp 0007

 

Windows 7 PCs.

 

Let me know if you have any ideas PTY.

 

Erik Thiessen

GETTING PRODUCT HIERARCHY DATA FROM TABLE T179 USING 1 LEVEL PRODUCT HIERARCHY

$
0
0

HI ALL,

 

i need get data from t179 using level-1.

 

what i want is...if i have PRODH = 10, i need all the levels data from t179 which are having PH1 as 10.

 

means i want data like..

10

1010

1010100

10101001000

1010100100010001

 

 

help me in this regard

thanks,,

SAP Netweaver, ABAP Training info

$
0
0

I am a newbie to the SAP World...But experienced developer in another ERP product....interested in learning SAP BASIS, and ABAP.

 

Which Training courses from SAP I need to take... [Only the essential modules]

Total mistake due to page break in Smartforms

$
0
0

Hello Experts ,

    Kindly Check the screen shots and help me with solving the issue in Smartforms.

 

 

Capture1.JPG

 

 

 

Capture2.JPG

 

 

So, because of this the subtotal is calculated wrong.If all the is in 1 page then it is working good.

Please help me to solve this ..

 

 

Thanks in Adv,

Abhisek

Add columns in transaction IP17 \ IP18

$
0
0

Hello,

I'm trying to add new column to ip17 report.

I appended the required field to structure RIHMPOS.

I can see the column in the report and I am now trying to fill it with data.

Refering to : http://scn.sap.com/thread/2007543.

When I try to do it in ENHANCEMENT-POINT RIMPOS00_G7 SPOTS ES_RIMPOS00,

the enhancement is at the begining of the start-of-selection where the report table is still empty.

None of the enhancement point i the program is after the end-of selection.

is there any other place I can do it?

 

Thanks alot,

Yotam.


How to search/scan the sourcecode of Function Module

$
0
0

Hi,

How to search / scan the Source code of Function module for any function modules used in it.

 

Scenario :

 

    There is a Function module called ztestfm. In the source code of ztestfm, if it is using other fucntion module

    ( Ex : CONVERSION_EXIT_ALPHA_INPUT).

 

Like scan-abap ....  is there any logic to find in the source code of Funciton module for a statement

 

Scan-abap  , CODE_SCANNER is not working in this case

 


Thanks

fetch multiple records using Native SQL

$
0
0

Hello All,

 

I am trying to fetch data from an external database which is an oracle sysrtem.

I am currenty using cursor method to fetch the data.

 

The "fetch next cursor1" only bring 1 record at a time. And it is taking more than 20 mins to bring 1 record, it seems the table i am fetching has more than 12 million records.

 

Can someone please answer these 2 questions:

 

1) If is have oracle commands to query their tables, can i use them directly between the EXEC SQL   and  ENDEXEC.

   When i put a semicolon its giving error. Oracle statements end with semicolon.

 

2) There must be a way of fetching a set of records at one go from external system. Does anyone know the technique.

 

 

I appreciate your help.

Error in SAPScript

$
0
0

Hi,

 

I have developed a custom sapscript. Its running fine via tcode FBL5N.

 

After the form is displayed when we are presing back we are getting a warning that :

 

IN FORM ZABC IN MAIN WINDOW TEST ELEMENT 510 IS MISSING.

 

No such text element was initially made by me. But after getting this warning, I have  inserted a line (/E 510) in sapscript main window.

 

But still the warning log is being shown.

 

Please let me know how I can get rid of this.

 

Thanks in advance.

 

 

Regards,

Elena

How to make 1st column as header in ALV grid

$
0
0

Hi Experts,

 

 

How to make 1st column as header in ALV grid as attached. Please help.

 

 

 

Thanks in advance.

Starting new task inside an Update Task

$
0
0

Hi guys,

I need an expert opinion for a problem I'm facing at the moment.

 

The requirement is this: I need to trigger a function module during the update task of a material document.

This function module however should not slow down the posting of the document, so it must not be in the same LUW, but in a separate task.

 

My question is: does it work to call a function module with STARTING NEW TASK inside an UPDATE TASK (for example a user exit) and if it does work, what's your opinion on it? Is if safe? Does it come with problems? According to the SAP documentation, STARTING NEW TASK does not trigger a COMMIT when it's called inside an update task.

 

The alternative would be to trigger a work flow, but that's much more work.

 

Any input is welcome.

 

Thanks.

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>