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

calculate working time in hours per month

$
0
0

Hello Gurus,

 

      I am creating a module pool program , where I am trying to calculate working time in hours per month for every employee.On screen I have provided 12 months with DAYS format.and finally calculating the number of hours in a field with QUAN having length 3 decimal 2.Now when user is providing the values in single digits its working fine but when user is providing 2 digit values its giving a dump of type p.Even I tried changing the DE of the final field like HOURS or CURR but still its giving dump.Could you please tell me about the domain which I should use for months and even for final calculation.

 

 

Thanks

Gaurav


Function Module with Table Type IMPORT

$
0
0

Hi,

 

I have a FM which has a IMPORT parameter which is of a table type say CRMT_OBJECT_GUID_TAB.

 

I am trying to test run the FM but I am not able to give the test data.

 

Can someone help regarding this issue.

 

Regards,

Adithi

Function Module with Table Type IMPORT

$
0
0

Hi,

 

I have a FM which has a IMPORT parameter which is of a table type say CRMT_OBJECT_GUID_TAB.

 

I am trying to test run the FM but I am not able to give the test data.

 

Can someone help regarding this issue.

 

Regards,

Adithi

what is " (SAPLIQS0)IVIQMMA" and '(SAPLIQS0)editor' stands for ?

$
0
0

hi ,

 

what is " (SAPLIQS0)IVIQMMA" and '(SAPLIQS0)editor' stands for ?

and, these values derrived from where ?

and, what the below codes trying to do ?

 

===========================================================

 

DATA lv_lwa_viqmma TYPE c LENGTH 20  VALUE '(SAPLIQS0)IVIQMMA'.

   FIELD-SYMBOLS : <fs_viqmma>      TYPE any.

   ASSIGN  : (lv_lwa_viqmmaTO <fs_viqmma>.

 

================================================

 

DATA: lv_editor TYPE c LENGTH 20 VALUE '(SAPLIQS0)editor'.

 

     FIELD-SYMBOLS : <fs_editor> TYPE REF TO cl_gui_textedit.

 

     ASSIGN (lv_editor) TO <fs_editor>.

     IF <fs_editor> IS ASSIGNED AND

        <fs_editor> IS NOT INITIAL.

       CALL METHOD <fs_editor>->set_readonly_mode

         EXPORTING

           readonly_mode          = 0

         EXCEPTIONS

           error_cntl_call_method = 1

           invalid_parameter      = 2

           OTHERS                 = 3.

====================================================

     ENDIF.


 

Thanks

Field-symbols appending to ITAB

$
0
0

I apologise in advance for my question as I am really not very bright.

 

 

I have field symbol declaration as:

 

field-symbols: <ls_line> type any,

                     <lt_itab> type table.  "Declared as TYPE TABLE because it could be a different table that the method is called for

 

 

LOOP.

... then some code

... which assigns a row of data to <ls_line>

 

I want to now append <ls_line> to <lt_itab>. Obviously I cannot put: append <ls_line> to <lt_itab>, because <lt_itab> is not yet assigned.

ENDLOOP.

 

 

I also cannot use "type any table".

 

How do I append this line i.e. <ls_line> to <lt_itab>?

Data Transfers - BAPI, BDC, ALE, LSMW, DX-WB

Grayed out particular cell in ALV

$
0
0

Hi Experts,

 

My requirement is to create ALV like Table Maintenance Generator.

Here,primary keys column must be non-editable during display.But,when new row is added,that primary keys cells for newly added row must be editable.

 

How to achieve this?

Thanks in advance...

How to test a Function Module by passing in an internal table?

$
0
0

Hi,

 

I am going to use this FM CRM_ORDER_READ_OW in my transformation routine in SAP BI to calculate the SLA Duration.

 

SLA Duration  = Time case confirmed/report generated - Case creation

 

I am referring to table SCAPPTSEG to get the time from (TST_FROM) and time to (TST_TO) of the APPT_TYPE = Z_DT_CREATED (case creation) & Z_DT_CONFIRM (case confirmed) by passing in the GUID value to the field APPL_GUID as shown below.

 

SCAPPTSEG.PNG

Before I use this FM, I would like to do a test run (test/execute F8) on the FM.

 

I want to pass the GUID/APPL_GUID = 00505605000903D0BBB625D2F08147D7 into the internal table IT_HEADER_GUID and pass the values Z_DT_CREATED & Z_DT_CONFIRM into the internal table IT_REQUESTED_OBJECTS so that the SLA Times will be exported into the parameter ET_APPOINTMENT.

 

FM.JPG

Can someone guide me on how to do this test run? I am not sure on how to pass the values.

 

Please help. Let me know if you have any further questions.

 

Thank you very much!

 

 

Kind regards,

Rebekah


Enhancement in SAP

$
0
0

 

 

Enhancement

 

     The R/3 Enhancement concept allows us to add your own functionality to SAP’s standard business applications without having to modify the      original applications. SAP creates enhancements for specific programs, screens, and menus within standard R/3 applications. These enhancements      do not contain any functionality. Instead, the enhancements act as hooks where WE can HANG our own add-on functionality onto these hooks.

 

Advantages


1. They do not affect standard SAP source Code

 

          When you add new functionality to your SAP system using SAP’s exits, you do not alter the source code of standard SAP programs in any           way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but           exist separately from SAP’s standard software package.

 

2. They do not effect software updates

 

When you add new functionality to your SAP system using SAP’s enhancements, your objects (called customer objects) must adhere (remain) to strict naming conventions (standards). When it comes time to upgrade to a new software release, customer objects names ensure that they will not be affected by any changes or new additions to the standard software package.

    

Note: Customer enhancements may not available for all programs and screens found in the SAP System. You can only use customer exists in the SAP System.


 

 

   


 

 

 

  • Screen and Menu Exits to enhance the front end.
  • Function Exits to Enhance the Programs
  • Append Structure to enhance Back End

 

Note : In Procedural, we have two type


  1. Using subroutines           -           User Exits (Out Dated)
  2. Using Function Modules   -           Customer Exits

 

User Exits

 

User exits allow you to add additional functions to the SAP standard. Programs with user exits contain subroutine calls at certain points in their syntax that are identified by the prefix USEREXIT. The actual user exits are located in an include that has been assigned to a module pool. This is where customers can include any changes (enhancements) that they want to make to the system. These includes are always processed during program flow.

 

Advantage: In principle, customers can modify anything they want that is found in the include (tables, structures, and so forth).

 

Disadvantage: SAP cannot check the individual enhancements themselves which often leads to errors in the enhancement process.

 

 

 

 

 

 

 

Customer Exits

 

The Entire SAP Product can be divided into 3 Parts

  1. Menu Exits
  2. Screen Exits
  3. Function Module Exits

 

 

1. Menu Exits :


Menu exits add items to the pull down menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.

 

SAP created menu exits by defining special menu items in the menu painter. These special entries have function codes that begin with “+” (a plus sign). You specify the menu items text when activating the item in an add-on project.

 

2. Screen Exits :


Screen exits add fields to screens in R/3 applications. SAP create screen exits by placing special sunscreen areas on a standard R/3 screen and calling a customer sub screen from the standard screen’s flow logic.

 

 

3. Function Module Exits :


Function module exits add functionally to R/3 applications. Function module exits play a role in both menu and screen exits. When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated. Function module exits also control the data flow between standard programs and screen exit fields.

 

Business Add-Ins


SAP has introduced new enhancement technique Business Add-ins from release 4.6A Business Add-in is the new enhancement technique based on ABAP Objects. BADI is an exit point in a source that allows specific industry sectors, partners, and customers to attach additional software to standard SAP source code without modifying the original object.

The users of Business Add-ins can customize the logic according to requirement or they can use the standard logic one available.

SAP guarantees the upward compatibility of all business Add-in interfaces. Release upgrade do not affect enhancement calls from which the standard software nor do they affect the validity of call interfaces.

 

Two different views of BADI are available:


  • In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional functionality to standard SAP source code without having to modify the original object.

 

  • In the implementation view, the users of Business Add-Ins can enhance (customize) the logic that need or use a standard logic if one is available.

 

Difference Between Customer Exits and BADIs:

 

Customer Exit

BADI

Procedural Approach to work with Enhancements,

Object Oriented Approach to Work with Enhancements.

Is a two level infrastructure (SAP and customer solutions).

Allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like).

 

BADIs can be created at each level within such a system infrastructure.

Can only be implemented once and enhancements that can be used actively by any number of customers.

In addition, Business Add-ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).

 

 

Source Code Enhancement


Source Code Enhancement is one of the enhancement technologies available under Enhancement Framework. Implementing this technology is also called as Source Code Plug-In. Technically the source code plug-in implementations are stored in a separate include program and not as part of the original source program.


There are two types of Source Code enhancements possible.


  • Implicit enhancement option
  • Explicit enhancement option

 

 

Implicit Enhancement

 

       Implicit enhancement points are basically points within ABAP code where an enhancement point is implied, and in which case can be created.      Examples of implicit enhancement points are at the beginning and end of FORM’s, at the end of a program, include or function module etc.

Explicit Enhancement

 

       Explicit enhancement points are basically hooks already coded into the program by SAP at various points of the code.

 

 

 

Your Suggestions Please.....

 

Regards,

Ramesh.T

MARM-UMREZ issue

$
0
0

Hi

 

Using MARM -UMREZ  (numerator for base Unit of measure ) in the following formulae

 

  lv_value = qty1 MOD MARM-UMREZ  . Internally umrez is a dec field so its being displayed as comma separated value. Eg : in table MARM value displayed as 30. But when used in above formulae , its being used as decimals only i.e 0.030.

 

Please let me know if this value can be converted to Packed Data type. As the requirement is to consider UMREZ as whole number.

 

Eg : consider quantity as 245.00

                     umrez  as : 30

                     remainder = 4

 

In the above explained situation its resulting teh remainder as : 10 (as umrez is a decimal value  , therefore calculation internally as : 245.00 MOD 0.030).

Alreday researched but couldnot find a conversion ffunction for the purpose og multiplying UMREZ into packed value.

 

Any suggestions will be beneficial..

 

thanks

pradosh

Fill GOHEAD structure from a field symbol

$
0
0

Hi all , i need some help with a user exit i'm working on .

 

I need to validate a value in MIGO but  the structure where the value is the GOHEAD , i read in other forum that using field symbols help , and it was right , i read the value form the structure but now i need to modify the value in that structure but don't know how , i hope can help me , this is the code i use for now

 

include ZXMBCTOP

 

FIELD-SYMBOLS<fs1> TYPE ANY,

                 <fs2> TYPE ANY.

 

 

include ZXMBCU02

 

DATA : XABLN LIKE GOHEAD-XABLN.

 

       ASSIGN '(SAPLMIGO)GOHEAD-XABLN' TO <fs1>.

       ASSIGN (<fs1>) TO <fs2>.

       XABLN = <fs2>. " this code enable you to retrieve the delivery note entered

 

       IF XABLN EQ SPACE.

 

         XABLN = 'VACIO'.

 

 

 

 

 

       ENDIF.


HR_MAINTAIN_MASTERDATA Entry not allowed

$
0
0

Hi ,

 

I am using FM HR_MAINTAIN_MASTERDATA to insert IT2010 records .

For some pernrs its not working properly .

FM is not returning any error . But it is also not returning modified key and record is not getting created .

When i tried to debug using dialogue mode 2 , It is giving message at bottom as 'Entry not allowed , It2001 absence'  , and not displaying pa30 screen.

is there any relation between It2001 and IT2010 . I dont have much functional knowledge of HR

 

Can you please help me with this .

View Table with Restriction

$
0
0

Hi All,

 

How can I achieve a view table with restrictions with something like below that would only allow user to select field/s to be maintained or display?

field selection.png

Thanks,

Trixa

 

gaps between two words in smartform

$
0
0

Hi Gurus,

 

I have started developing new samrtform,  it is working fine but i am facing some problem in print preview.  everywhere it is showing lot of gaps between the words.  Ex:  in table one of the column heading is "Material No",  but in print preview it is showing "Material    No".  not only in table in all the windows all the texts is showing same gaps.

 

Thanks in Advance.

 

Gopal

Batch input error in background mode.

$
0
0

Hi all,

 

i am running a batch input session in background mode and getting an error. When I run it in foreground there is no error. What I am doing wrong?

 

Error 00349: Field XXX does not exist on screen SAPPKLPP0.

 

Help!!!


Can we create and place our own BADIs in SAP standard code?

$
0
0

1)Can we like create our own BADIs?

2) As per the normal thinking SAP has placed calls to BADIs at different places in the standard code,we can

then implement those BADIs to get some functionality .Then why would we or what would be the purpose of creating

a new BADI definition and if we can how can we use it?

SM30 : Individual entries cannot be put into the change request

$
0
0

Hi All,

 

I have searched SDN also.

  I Have created a  Z table with delivery class 'C'. and fields was

 
    1) MANDT

    2) FLD1  INT1

    3) FLD2  CHAR40

    4) FLD3  DATS

    5) FLD4  DATS

Now I have created Table Maintenence Generator for this table and it was working fine.

I am able to create TR for all entries even If I seelctede for single entry.

 

But the problem is I am not able to create trasport request for each entry. I am getting the below message.

 

 

Individual entries cannot be put into the change request

 

Message no. SV141

 

Diagnosis

 

For technical reasons, the entries cannot be fully specified in the change
request. There are two possible reasons for this:

 

    1. The key of an entry is longer than 120 characters. All entries whose keys
    match up to character 119, are then copied into the change request, rather than
    an individual entry.

 

    2. The key of an entry contains fields of special data types, for example,
    packed numbers. The key can only be specified in the change request up to the
    first such field from the left.

 

all entries whose keys match up to character 6 are copied into the change
request, rather than a single entry.

 

System Response

 

The selected entry is copied into the change request correctly, but other
entries may be copied as well.

 

 

I tried with View V_TVDIR -> Individual entries check box also.

 

How to proceed further? I need to provide option to created different TRs individual entries.

 

 

Thanks,

Vishnu

Debugging Problem

$
0
0

Hi Expert,

 

It's great, if someone tells me how to find the location of when the exception is threw or it set up a paticular value for SY-MSGID, SY-MSGTY and etc.

 

The backgroud is the program calling the BAPI funcation for creating a Sale Order,  meanwhile, it usally create the deliver oder  for the sales order. but sometimes it depends on the material, the deliver order wouldn't be created.  Thus, I need to know when it sets Sy_MSG* parameter in the program, so to  ping-point the problem from the material's data.

A table as selection criteria.

$
0
0

Hi!

How would you create a report, which requires not a parameter, not a range (select-options) but a table.

I mean, the user should be able to select:

 

Article A in Plant B and

Article C in Plant D and

...so on...

 

Using select-options will retrieve 4 entries: (2 articles x 2 plants).

Regards

Save account group in an internal table?

$
0
0

There is a functionally modul to save account group hierarchy (created with T.KDH1) in an internal table?

regards,

Mio

Viewing all 8332 articles
Browse latest View live


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