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

Looking for a very good tutorial for data transfer(IDOC,BAPI,Batch input,LSMW)

$
0
0

Hi all,

 

please if you have a very good tutorial for each of these IDOC,BAPI,Batch input,LSMW please send me the link. There are so many tutorials online. I want to ask you if you have already found a very good one (very good explanation of the topics).

 

Thanks.


FBL5N correspondence printing issue for SAP09 and SAP11

$
0
0

Hello Gurus,

 

I have encountered a strange problem in correspondence printing for FBL5N.

If I run correspondence SAP11 first for credit memo (doc type DG) and then, whilst still in the FBL5N customer list screen, run correspondence SAP09 for invoice (doc type DR), the system still picks up correspondence SAP11 instead of SAP09.

 

However, if I exit from FBL5N customer list screen, then, rerun FBL5N and run the correspondence SAP09 for invoice (doc type DR), it produce output. As if SAP11 stays in the buffer if I did not exit the FBL5N screen.

 

Does anyone know any SAP note on the same or anything needs to be fixed from functional/technical side.

 

Thanks in advance

 

Regards,

 

Monal

SM30 - Message Specify the key within the work area

$
0
0

Hi Experts, i have a problem with tcode SM30, when i want to Enter new entries using the option Enter Conditions. then i select field that i want to enter condition, after that i select the entries to copy and then change the field. when i try to save the systems throws the message:

 

Specify the key within the work area                                                                               

Message no. SV033                                                                               

Diagnosis                                                                               

You have attempted to create an entry whose key is not in the range

    defined for this area.                                                                               

System Response                                                                               

The entry cannot be created.                                                                               

Procedure                                                                               

Please check your entry.                                          

 

 

Someone have a clue to solve this?

 

regards and thanks in advance

 

Mario

Exclusive Lock

$
0
0

Hi All,

 

In which case exclusive locks can be requested several times from the same transaction.

In which situation required multiple time request to lock object in same transaction.  

How to set filters externally in multiple grid display.

$
0
0

Hi All,

 

I have a report which has two grids one below the other displayed in foreground and background.

  • For FOREGROUND display, I have used OOPS ALV and for BACKGROUND, the first list is displayed using REUSE_ALV_LIST_DISPLAY and second list is appended at END-OF-PAGE event.
  • Now in this report I want to externally set the filter for first grid, so that the second grid also gets changed according to the filter set in first grid externally, in foreground as well as background.

 

For eg : When I set filter externally on field purchase group i.e. ekgrp  in first grid, it shows filtered records accordingly. But the filter does not get applied to second grid. It displays all the records( i.e. purchase group) based on input in selection screen. 

So my requirement is,  if  I set filter externally on a particular field i.e. purchase group(ekgrp)  in first grid, then that filter should be set for second grid also. The second grid should display records based on filter set in first grid in foreground as well as background.

 

Is there any solution to achieve this?

Appreciate your help.

 

Regards,

Supriya.

How to use 'TH_WP_DETAIL_INFO'

$
0
0

Hi all,

 

How do we use this FM 'TH_WP_DETAIL_INFO' to get the PID of the current program?

 

 

when I execute like this

 

CALL FUNCTION 'TH_WP_DETAIL_INFO'
EXPORTING
    WP                           = 'XX'
    WITH_CPU                = '10'
    WP_INDEX                = '0'
  IMPORTING
    WPINFO                       = wpinfo.


I am always getting the first PID in stack.


Please help me

 

Thanks in advance.

Santhosini

Error while opening XML file 'The XML page cannot be displayed' .

$
0
0


Hi  ,

 

I have created an xml file in the application server . when i try to open it , it is giving error .

 

"

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.  "

 

There is no error in the file. But, when i open it in notepad ,and save it without doing any modificatons . it is openning correctly .

 

Can any anybody suggest how to make the file opened directly with out openning it in notepad and do save ?

 

Br.

Prithvi.

How to use multiple times fieldcatlog-seltext_m in grid display ?

$
0
0
Transaction Type:500505
EnglishOpen.bal.provisionsOpen bal.transl.diff
GermanAnfangsbest. Rückst.Währungsdiff. AB
Profit CenterSAP GL AccountSAP GL Account Descr.
28104390000Other Accrued Liability1,000.000.00
28104390012Other Accrued Liability Energy15,000.000.00
28104390017Other Accrued Liability Fringe Costs5,000.00

0.00

 

This is my requirement ....

 

1 .Hear i am using grid display .

2. 500 and 505 data getting data from falgelflexa ...

3.  under that fields (500 and 505 ) i want to display description from the table t856t  based on the user language like english or german.

 

in grid display how to append new row to display the description .

 

HOW TO WRITE A CODE ......

PLEASE HELP ME .......

 

Thanq,

prasad .


Add fields to Tcode ME55

$
0
0

Hi ,

i have requirement to add item text to be added to std tcode ME55 for display in ALV.

any BADI to do it.please shere any possible ways other than going for custom.

 

 

Regards,

Umakant.

BAPI_ALM_ORDER_MAINTAIN for USER status change in IW32 transaction?

$
0
0

Hi Experts,

 

I have the status -->W_MA (Waiting material)  for the order # 123. I want to change as ' W_LA (Waiting Labour)'. I tried the following code, it is not updated in the transaction. 

 

 

  lw_header-orderid = lv_aufnr.

lw_header-order_type = 'ZPM1'.

lw_header-planplant = 'INJA'.

APPEND lw_header to li_header.

 

 

CLEAR w_METHODS.

W_METHODS-REFNUMBER   1.

w_METHODS-OBJECTTYPE  'USERSTATUS'.

w_METHODS-METHOD      'CHANGE'.

w_METHODS-OBJECTKEY   lv_aufnr.

APPEND w_METHODS to t_methods.

 

CLEAR w_USERSTATUS.

w_USERSTATUS-USER_ST_TEXT 'W_LA'.

w_USERSTATUS-LANGU        SY-LANGU.

w_USERSTATUS-INACTIVE     ''.                                             "Not set to X

w_USERSTATUS-CHANGE_EVENT '01'.

APPEND w_userstatus to T_USERSTATUS.

 

 

CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'

   TABLES

    IT_METHODS                        = T_METHODS

    IT_HEADER                         = li_header

    IT_USERSTATUS                     T_USERSTATUS

    RETURN                            = T_RETURN

    ET_NUMBERS                        = T_NUMBERS

 

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

     WAIT          = 'X'

* IMPORTING

*   RETURN        =



Many thanks in Advance

           .

call screen in middle of a program

$
0
0

Hi techies,

                     I have a program in which I need to display parameters and based on these parameters I need to select records from table and again display a screen where we can enter fiscal period and date fields and hence depending on these two entries I need to update the previously filled table.

 

Question is how to call a new screen in middle of program where I need to give input fields and update table with these two field entries.

Error in Offset program

$
0
0

Hi Friends,

          While running this program in SAP Abap in SE38. i am getting the following error message.here i attached the screenshot of that error as well as offset  coding.

 

CODING

 

report  zvsamoff no standard page heading line-size 255.

 

data: month(2) type c,

      date(2) type c,

      year(4) type c.

write:/ sy-datum.

 

year = sy-datum+00(04).

month = sy-datum+04(02).

date = sy-datum+06(02).

 

write:/10(20) 'current year  =', 30(4)  year.

write:/10(20) 'current month =', 30(2) month.

write:/10(20) 'current date  =', 30(2) date.

*write:/10(20) text-000 , month under year.

*write:/10(20) text-001 , date  under month.

 

data: range(3) type c,

      lv_low(3) type c,

      lv_high(3) type c.

data: lv_1(3) type c,

      lv_2(3) type c,

      lv_3(3) type c,

      lv_low1(3) type c,

      lv_high1(3) type c.

 

select-options: cust for range.

lv_low = cust-low.

lv_high = cust-high.

 

lv_low1 = cust-low.

lv_high1 = cust-high.

 

 

 

Regards

Vinoth

Script output aligmen for Amount

$
0
0

Hi  ,

 

I would like to  print  Amount as

 

1)

 

Pint document:          12345

Name:                        Test

Amount:                     23412.31      

 

 

Pint document:          12345

Name:                        Test

Amount:                     45.21   

 

but printing as

 

 

Pint document:          12345

Name:                        Test

Amount:                   23412.31     

 

 

 

Pint document:          12345

Name:                        Test

Amount:                         45.21

but it is   need to   print output as in same line

 

2)   in  Smart style  declared one  paragraph  format   under  indents and spacing tab

 

as  Left  margin   25 Chars

 

 

when it is assign  to editor  as

P1  Print document:         &opbel&

 

printing  output as

 

----------------------------------------------Print document               12345

   25 chars

 

I need to move  only value    , it should print as

ex

Print document                       12345

 

 

Thanks,

 

Rana

How to append new row in alv output ?

$
0
0
Transaction Type:500505
EnglishOpen.bal.provisionsOpen bal.transl.diff
GermanAnfangsbest. Rückst.Währungsdiff. AB
Profit CenterSAP GL AccountSAP GL Account Descr.
28104390000Other Accrued Liability1,000.000.00
28104390012Other Accrued Liability Energy15,000.000.00
28104390017Other Accrued Liability Fringe Costs5,000.00

0.00

 

This is my requirement ....

 

1 .Hear i am using grid display .

2. 500 and 505 data getting data from falgelflexa ...

3.  under that fields (500 and 505 ) i want to display description from the table t856t  based on the user language like english or german.

 

in grid display how to append new row to display the description .

 

HOW TO WRITE A CODE ......

PLEASE HELP ME .......

 

Thanq,

Prasad.

Rename Customer Data Tab in PO

$
0
0

How can i rename the customer data tab in the ME21N (PO creation screen) ?

 

Please advise.


LUW - Part1

$
0
0

Logical unit of work (LUW) in SAP:

The objective of this document is aimed at explaining the concept of logical unit of work in SAP. I assume that this will be a good read for my fellow readers.

 

Why logical units of work?

The main purpose of the logical unit of work is to ensure data consistency in the R/3 systems. Let us consider that there is a complex R/3 transaction that involves a series of dialog steps; during the execution of one such dialog step at the middle of the transaction the data involved will lack completeness & will therefore be inconsistent. When talking about of logical unit of work we must note the following points initially.

  1. Database LUW also known as DB LUW, each dialog step has its own DB LUW that is used to ensure data consistency.
  2. SAP LUW consists of several dialog steps and all the changes to database are written in a single DB LUW. We must note that the database changes are always written in the final database LUW.
  3. Therefore to summarize a complex R/3 transaction may span across several dialog steps each having its own DB LUW, however all the changes are written to the database in the final DB LUW of the SAP LUW after a commit work is executed by the system or rolled back with no changes written to the database due to errors.


What is a database LUW?

A database LUW is work unit consisting of database operations (INSERT, UPDATE, MODIFY & DELETE) that it used to make the database changes.  The final database LUW of a SAP LUW is used to make the changes to the database, the changes to the database is not made until after the database commit. The database LUW is executed in a special kind of work process called the update work process.


What is a SAP LUW?

A SAP LUW is a logical unit work that spans over several dialog steps. Let us consider a complex R/3 transaction of n screens; where each screen has its own DB LUW involving database operations and are logically related to each other. It is important that the changes to the database for this complex transaction must be made all at once or it must be rolled back all for the data consistency; that is where the SAP LUW becomes critical in maintaining a logical relationship between several DB LUWs (dialog phases) & making all the changes to the database in the final DB LUW. SAP LUW uses the bundling technique to achieve the same. There are several possibilities of bundling technique and one of them is bundling the database changes using a function module call in the UPDATE TASK.

 

Bundling in SAP LUW:

A CALL FUNCTION…IN UPDATE TASK is one of the bundling techniques to achieve all the database changes in the last DB LUW of the SAP LUW. The open SQL statements for database changes are placed in the function module instead of placing them in the code, using the addition UPDATE TASK ensures that the function module is not executed until COMMIT WORK is found in the program. At COMMIT WORK the function module calls with UPDATE TASK are executed in a special work process called update work process and the changes to the database is executed in the final DB LUW of the SAP LUW.


R/3 transactions using update function modules.

Let us consider there is one R/3 transaction calling another R/3 transaction and as well as calling some update function module. There is some typical behavior that can be noted for this particular scenario.

  • (a)    The called transaction begins in a new SAP LUW in comparison to the calling transaction. It implies that there are two different SAP LUWs now.
  • (b)   A new update key is generated for the new SAP LUW that is used to identify all the update function modules.
  • (c)    If the called R/3 transaction does not have a COMMIT WORK then the update function modules will not be executed i.e. both the calling transaction & the called transaction must have their own COMMIT WORK.
  • (d)   The update function modules are called only after the system has executed a COMMIT WORK.
  • (e)   Let us consider there is an importing parameter -IM_X  for the update function module; now the same function module is called at several places in the program like shown below –

DATA: gv_x TYPE i.

gv_x = 1.

CALL FUNCTION UPD_FUNC IN UPDATE TASK

EXPORTING

         IM_X = gv_x.

gv_x = 2.

CALL FUNCTION UPD_FUNC IN UPDATE TASK

EXPORTING

         IM_X = gv_x.

 

gv_x = 3.

COMMIT WORK.

 

What will be the value of gv_x at the COMMIT WORK?

No, the value of gv_x will not be 3; when commit is executed by the system the value of gv_x that will be passed is dependent at the point of function call therefore during the first call the value of gv_x will be 1 & during the second call the value of gv_x will be 2.

Get the stack of SY-UCOMM or all the values of SY-UCOMM in a flow.

$
0
0

Hi All,

 

I just wanted to know, whether it is possible to get all the values of SY-UCOMM in a flow

or may be immediate pervious value of SY-UCOMM.

 

Can some one please post there view.

 

Thanking You All.

How to know who create db table (in code)

$
0
0

Hello,

I writing a function module. I have string that contains the name of database table, and I need to know if the table is SAP standart table, or z table that not created by SAP.

 

Thanks,

Ednri.

Fieldcat Options

$
0
0

Hi All ;

 

I want to follow up monthly staff input and output clocks.When I select two dates,I want to see input output clocks

between two dates.The problem is that I can organize the fcat name but I have to list the input output clocks dynamically.

For ex. a staf name : Can Surname: SU Pers Number : 12001 . I want to input clocks between 18.05.2012 - 22.05.2012 .

(There are 3 entries between dates.)Now the ALV seems like below ;

SHC3.jpg

But it has to be like below ;

 

SHC2.jpg

The FCAT codes ;

 

BEGIN OF GT_DONEM OCCURS 0,

    BDATE like  ZHR_TABLO-BDATE,

    BTIME like  ZHR_TABLO-BTIME,

    CTIME like  ZHR_TABLO-CTIME,

  END OF GT_DONEM.

 

LOOP AT GT_DONEM.

     CHECK GT_DONEM-BDATE IS NOT INITIAL.

     CLEAR GS_FCAT.

   INTO GS_FCAT-REPTEXT.

     GS_FCAT-FIELDNAME = 'BTIME'.

     GS_FCAT-REF_FIELD = 'BTIME'.

     GS_FCAT-REF_TABLE = 'ZHR_TABLO'.

       CONCATENATE GT_DONEM-BDATE+6(2) '.'

                   GT_DONEM-BDATE+4(2) '.'

                   GT_DONEM-BDATE+0(4)

         INTO GS_FCAT-REPTEXT.

     GS_FCAT-COLTEXT = GS_FCAT-REPTEXT.

  APPEND GS_FCAT TO GT_FCAT.

ENDLOOP.


Im waiting for your answers.Thanks.


Regards.

Fırtına



can you provide me smartforms for check print for program zrffous_c(copy of standard)

$
0
0

HI,

can you provide me smartforms for check print for program zrffous_c(copy of standard).

THANKS,

payel

Viewing all 8332 articles
Browse latest View live


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