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

Raise no_more-data and endless loop

$
0
0

Hi all experts,

 

I am having trouble with raise no_more_data statement. If i don't use it, my code will be endless.

However, if i use it, there is no data inserted in S076 table.
Where should i use it?

AAA.png


to transport the table from production to quality

$
0
0

My issue that my client wants to move one single table from Production to quality... can anyone tel me if there is anyway we move the tables... please help..

French character was missing

$
0
0

HI All,

 

Have you encountered such case, french character "ä" "ö" were always gone when a RTF document was created.

So far, we don't know the RTF document was generated, in SAP or non-SAP. but I'm sure the data was got from SAP DB.

do you have any idea abou this?

 

Ohjelmistopäivitysten  -> Ohjelmistopivitysten

F4IF_FIELD_VALUE_REQUEST - Search Help

$
0
0

Hi All ;

 

I used the 'F4IF_FIELD_VALUE_REQUEST' function for add search help to the selection screen.

The problem is that I want to add an if-else condition for the function.Now the function is working for all

selection fields.How can I add a criteria for if-else.

The funtion like below ;

 

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

  EXPORTING

   tabname                   = 'T023T'

   fieldname                  = 'MATKL'

    SEARCHHELP         = 'Z_MATKL'

** SHLPPARAM                = ' '

*  DYNPPROG                  = sy-repid

*  DYNPNR                    = sy-dynnr

*  DYNPROFIELD               =

** STEPL                     = ''

** VALUE                     = ' '

** MULTIPLE_CHOICE           = ' '

** DISPLAY                   = ' '

** SUPPRESS_RECORDLIST       = ' '

** CALLBACK_PROGRAM          = ' '

** CALLBACK_FORM             = ' ' .

*TABLES

*  RETURN_TAB                = return_f4.

*  EXCEPTIONS

** FIELD_NOT_FOUND           = 1.

** NO_HELP_FOR_FIELD         = 2.

** INCONSISTENT_HELP         = 3.

** NO_VALUES_FOUND           = 4.

** OTHERS                    = 5 .

*

*if return_f4[] is not initial.



Regards

Fırtına


Trying to connect to SQL SERVER

$
0
0

We have SAP on Oracle database but as we are implementing our HR system on SQL Server so we need to connect to SQL SERVER through ABAP in order to retrieve some information. We created the Connection successfully but when trying to retrieve the data it is giving us following dump :

 

Runtime Errors         DBIF_DSQL2_INVALID_CURSOR

Except.                   CX_SY_NATIVE_SQL_ERROR

 

Invalid interruption of a database selection

 

The code through which i am trying to retrieve the data is as follows :

 

DATA: c1  TYPE cursor.

 

DATA : BEGIN OF EMP_DATA OCCURS 0,

        FNAME(5000) TYPE C,

        END OF EMP_DATA.

 

DATA : fnm TYPE STRING.

 

EXEC SQL.

   CONNECT TO  'HRMS'

ENDEXEC.

 

 

if sy-subrc eq 0.

   MESSAGE 'Connected..' TYPE 'I'.

else.

   MESSAGE 'Not Connected..' TYPE 'I'.

endif.

 

EXEC SQL.

   OPEN c1  for

   SELECT FNAME

   FROM view_EMPDATAPayroll_New

ENDEXEC.

 

if sy-subrc eq 0.

   MESSAGE 'Access Successful..' TYPE 'I'.

else.

   MESSAGE 'Access Not Successful..' TYPE 'I'.

endif.

 

DO.

   EXEC SQL.

     FETCH NEXT c1 INTO  :EMP_DATA.FNAME;

   ENDEXEC.

 

   APPEND EMP_DATA.

 

   IF sy-subrc <> 0.

     EXIT.

   ENDIF.

 

ENDDO.

 

EXEC SQL.

   CLOSE c1

ENDEXEC.

 

EXEC SQL.

   DISCONNECT 'HRMS'

ENDEXEC.


We have tried a lot to solve the error but every time we are getting the same dump. It is giving dump at the following command :



FETCH NEXT c1 INTO  :EMP_DATA.FNAME;


The connection properties are also as follows :


DB Connection      HRMS

DBMS                 MSS

User Name           sa

Conn. info            MSSQL_SERVER=192.168.0.60\SQLEXPRESS MSSQL_DBNAME=HRAlign_Rubamin

 

Please help me out.

 

Tarun.

Implementing BADI MD_ADD_COL_EZPS in extending MD04 transaction.

$
0
0


Hello Experts,

 

I have a query in regard to extending MD04 transaction.

Currently MD04 is enhanced with 3 custom buttons (used buttons are: BUTTON1_EZ, BUTTON2_EZ and BUTTON3_EZ)  being displayed based on which a new column gets displyed in the table control.

Now when I have to  add a new custom button, I try to use BUTTON1_PS in same implementation of BADI "MD_ADD_COL_EZPS" to display another column in table control.

 

The problem here is that it isn't getting displayed on MD04 screen nor can I use it from path in Menu Bar:

Settings --> User Exit Periods. Here it isn't showing in activated mode.

 

Kindly provide your inputs.

 

Regards,

Ansh

no of rows for a particular field in internal table

$
0
0

Hello Friends

 

i want to find out the no of rows( NO OF BILLS ) for a particular field in an internal table , could any one pls let me know ,

 

pls see the screen shot and also my code

 

Thanks

Vijaya

 

1.jpg

 

TYPES : BEGIN OF ty_str,

         remit TYPE char11,

         sno(2) TYPE n,

         ddo TYPE char50,

         voucher_no(4) TYPE n,

         voucher_date TYPE d,

         amount TYPE wrbtr,

         END OF ty_str.

 

DATA : it TYPE TABLE OF ty_str,

        wa TYPE ty_str.

 

 

CLEAR wa.

wa-remit = '8782-103-03'.

wa-sno = '01'.

wa-ddo = 'xyz'.

wa-voucher_no = '0001'.

wa-voucher_date = '30062014'.

wa-amount = '379557'.

APPEND wa TO it.

 

 

CLEAR wa.

wa-remit = '8782-103-03'.

wa-sno = '02'.

wa-ddo = 'bbb'.

wa-voucher_no = '0002'.

wa-voucher_date = '30062014'.

wa-amount = '8209'.

APPEND wa TO it.

 

 

CLEAR wa.

wa-remit = '8443-800-03'.

wa-sno = '01'.

wa-ddo = 'abc'.

wa-voucher_no = '0001'.

wa-voucher_date = '12062014'.

wa-amount = '198315'.

APPEND wa TO it.

 

CLEAR wa.

wa-remit = '8443-800-03'.

wa-sno = '02'.

wa-ddo = 'bbc'.

wa-voucher_no = '0001'.

wa-voucher_date = '12062014'.

wa-amount = '105922'.

APPEND wa TO it.

 

 

CLEAR wa.

wa-remit = '8443-800-03'.

wa-sno = '03'.

wa-ddo = 'kkk'.

wa-voucher_no = '0007'.

wa-voucher_date = '12062014'.

wa-amount = '2042278'.

APPEND wa TO it.

 

 

CLEAR wa.

wa-remit = '8443-800-03'.

wa-sno = '04'.

wa-ddo = 'lll'.

wa-voucher_no = '0008'.

wa-voucher_date = '12062014'.

wa-amount = '418735'.

APPEND wa TO it.

 

 

CLEAR wa.

wa-remit = '8443-800-03'.

wa-sno = '05'.

wa-ddo = 'kkk'.

wa-voucher_no = '0012'.

wa-voucher_date = '12062014'.

wa-amount = '1020066'.

APPEND wa TO it.

 

 

 

SORT it BY remit DESCENDING.

 

LOOP AT it INTO wa.

 

   AT NEW remit.

     WRITE : / wa-remit.

   ENDAT.

 

 

   WRITE : / wa-sno, wa-ddo, wa-voucher_no, wa-voucher_date, wa-amount.

 

   AT END OF remit.

     SUM.

     WRITE : /65  'Total', wa-amount.

   ENDAT.

 

 

 

ENDLOOP.

How to format XML tags in lean manner

$
0
0

Hi,

 

I have the XML file like unformatted need to format it in ABAP, please suggest me some examples ?

 

Unformatted:

 

<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><SchemaVersion>2.0</SchemaVersion><ProjectGuid>{00163e06-2091-1ee4-8399-32cf04305b1f}</ProjectGuid><ProjectType>CopernicusProject</ProjectType><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Name>YCNBE4GCY</Name><RootNamespace>YCNBE4GCY</RootNamespace><RepositoryNamespace>http://463558-one-off.sap.com/YCNBE4GCY_</RepositoryNamespace><RuntimeNamespacePrefix>YCNBE4GCY_</RuntimeNamespacePrefix><RepositoryRootFolder>/YCNBE4GCY_MAIN</RepositoryRootFolder><DefaultProcessComponent>YCNBE4GCY_YCNBE4GCY</DefaultProcessComponent><DevelopmentPackage>$YCNBE4GCY_DEV</DevelopmentPackage><XRepSolution>YCNBE4GCY_MAIN</XRepSolution><BCSourceFolderInXRep>/YCNBE4GCY_BC/SRC</BCSourceFolderInXRep><ProjectSourceFolderinXRep>/YCNBE4GCY_MAIN/SRC</ProjectSourceFolderinXRep><DeploymentUnit>CUSTOMER_RELATIONSHIP_MGMT</DeploymentUnit><CompilerVersion>1302_FP15</CompilerVersion></PropertyGroup><PropertyGroup Condition=" '$(Configuration)' == 'Debug' "><OutputPath>bin</OutputPath></PropertyGroup><ItemGroup/><ItemGroup/><ItemGroup/><Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets"/></Project>

 

 

I want to format it like below :

 

Formatted:

 

<?xml version="1.0" encoding="utf-8" ?>

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>

<SchemaVersion>2.0</SchemaVersion>

  <ProjectGuid>{00163e06-2091-1ee4-8399-32cf04305b1f}</ProjectGuid>

  <ProjectType>CopernicusProject</ProjectType>

  <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>

  <Name>Y5CMK5NHY</Name>

  <RootNamespace>Y5CMK5NHY</RootNamespace>

  <RepositoryNamespace>http://463558-one-off.sap.com/Y5CMK5NHY_</RepositoryNamespace>

  <RuntimeNamespacePrefix>Y5CMK5NHY_</RuntimeNamespacePrefix>

  <RepositoryRootFolder>/Y5CMK5NHY_MAIN</RepositoryRootFolder>

  <DefaultProcessComponent>Y5CMK5NHY_Y5CMK5NHY</DefaultProcessComponent>

  <DevelopmentPackage>$Y5CMK5NHY_DEV</DevelopmentPackage>

  <XRepSolution>Y5CMK5NHY_MAIN</XRepSolution>

  <BCSourceFolderInXRep>/Y5CMK5NHY_BC/SRC</BCSourceFolderInXRep>

  <ProjectSourceFolderinXRep>/Y5CMK5NHY_MAIN/SRC</ProjectSourceFolderinXRep>

  <DeploymentUnit>CUSTOMER_RELATIONSHIP_MGMT</DeploymentUnit>

  <CompilerVersion>1302_FP15</CompilerVersion>

  </PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

<OutputPath>bin</OutputPath>

  </PropertyGroup>

  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets"/>

    </Project>


Thanks in advance.


Best Regards, Prabhu


Change Documents for View Cluster

$
0
0

Hi guys,

 

     I want to know how SAP records View Cluster changes and How they will again fetch the OLD data and NEW data whenever we select Change Logs from Utilities. I have debugged the RSVTPROT Program, View_Mark_Write FM but I am not exactly getting how SAP is processing the data.

Can anybody please help me out.

 

Thanks in advance,

Pa30 infotype 0008 issue

$
0
0

Hi Experts,

I have calculated 1LTA and 1SPL wagetype. in p0008 structure..

 

after calculating it is going to the database also.

but in display mode it is again changing the value as previous one.

i have use "show data again" , but scrolling is not working in this case '1085922 ' note.

i have use field symbol also.

every thing is working fine.

but  again when we save the data.

after that it is reflecting in pa0008 also , but again it is showing the previous value.

 

i have use badi also HRPAD00INFTY..

but no result..

 

Please provide some solution ..

Need User exit when we change the Order Header Status

$
0
0

Hi All,

 

My Requirement :

On save, if header status is changed, send the new status to Third party

Header status = ZEDUHDR
Possible values: RVW (In review), APP (Approved), REJ (Rejected), CVEX (Contract Value Exceeded)

ZSD_<ThirdPary>_STATUS_UPD

Statuses map to the following codes:
New statuses to be added:
5 = In review
6 = Approved
7 = Rejected
8 = Insufficient funds

 

I have applied the code in the user exit USEXIT_SAVE_DOCUMENT --> fm : Z_MV45AFZZ_SAVE_DOCUMENT as below :


SELECT SINGLE estat INTO l_estat FROM tj30t

           WHERE stsma = 'ZEDUHDR' AND  txt04 = 'RVW' AND spras = 'EN'.

 

           READ TABLE it_status WITH KEY   stat = l_estat.

           IF sy-subrc EQ 0.

             status_code    = 5.

             return-message = 'Order status is in Review'.

             APPEND return.

             RETURN.

           ENDIF.


SELECT SINGLE estat INTO l_estat FROM tj30t

           WHERE stsma = 'ZEDUHDR' AND  txt04 = 'APP' AND spras = 'EN'.

 

           READ TABLE it_status WITH KEY   stat = l_estat.

           IF sy-subrc EQ 0.

             status_code    = 6 .

             return-message = 'Order status is Approved'.

             APPEND return.

             RETURN.

           ENDIF.

 

But When I am changing the status from review to approve in VA02  transactioin HEADER-->STATUS and trying to SAVE it is not triggering the above user exit

USEXIT_SAVE_DOCUMENT .

Could you please suggest which user exit will be suitable to trigger when the status is changed .

 

Thank you.

 

Regards,

Bharat 

sending idocs from SAP Netweaver trial

$
0
0

What custom idoc outbound type is possible to send from SAP Netweaver trial?

Hi All, issue with select query.

$
0
0

When i selecting the field fom table and using into appending corresponding field of table i_Authobj statement

where name like Auth_% and value like 'Y4AP_FDAUT'.

Then it's gives the error like - field appending is unknow. it's neither in one of the specified table nor define by data statement.

 

Below is my code

 

 

SELCT name value

            FROM t08

            INTO APPENDING CORRESPONDING FIELDS OF TABLE i_authobj

            WHERE name LIKE 'AUTH_%'

             and value like 'Y4AP_FDAUT%'.

 

Let me know if any body resolve this problem.

How to Disable VA02 Partner Screen Input (Header Data)

$
0
0

Hi Experts,

 

Is it possible to gray-off Partner input field of Partners Tab in Header Data (as shown in the attached file) of VA02 only?

 

 

My SD colleague told me that it is possible to disable that field in config but it will be disabled in VA01 as well. She's asking if it's possible that the users can input the partner during creation (VA01) but they will not be allowed to change it using VA02 anymore.

 

 

Thanks in advance.

 

 

/f

 

 


 


Problem in ALV Interactive Report

$
0
0

hello gurus

 

 

Please help me in sample code to write interactive alv where I have to create one basic list which i have created and the when i will be clicking

particular record , it should go to secondary list and display further records.

 

Here's the code as -

 

REPORT Z_KK_ALV.
TABLES: ekko,ekpo.

TYPE-POOLS: slis.

TYPES: BEGIN OF t_ekko,
        ebeln TYPE ekko-ebeln, "Purchasing Document Number"
        end of t_ekko.

TYPES: BEGIN OF t_ekpo,
            ebeln TYPE ekpo-ebeln, "Purchasing Document Number"
            loekz TYPE ekpo-loekz, "Deletion Indicator"
            statu TYPE ekpo-statu, "RFQ status"
            aedat TYPE ekpo-aedat, "Purchasing Document Item Change Date"
            txz01 TYPE ekpo-txz01, "Short Text"
            matnr TYPE ekpo-matnr, "Material Number"
            ematn TYPE ekpo-ematn, "Material Number"
            bukrs TYPE ekpo-bukrs, "Company Code"
            werks TYPE ekpo-werks, "Plant"
            lgort TYPE ekpo-lgort, "Storage Location"
            bednr TYPE ekpo-bednr, "Requirement Tracking Number"
            matkl TYPE ekpo-matkl,
            infnr TYPE ekpo-infnr,
            netpr TYPE ekpo-netpr,
            netwr TYPE ekpo-netwr,
            brtwr TYPE ekpo-brtwr,
            spinf TYPE ekpo-spinf,
            prsdr TYPE ekpo-prsdr,
            prdat TYPE ekpo-prdat,
            effwr TYPE ekpo-effwr,
        end of t_ekpo.

TYPESBEGIN OF t_final,
            ebeln TYPE ekpo-ebeln, "Purchasing Document Number"
            loekz TYPE ekpo-loekz, "Deletion Indicator"
            statu TYPE ekpo-statu, "RFQ status"
            aedat TYPE ekpo-aedat, "Purchasing Document Item Change Date"
            txz01 TYPE ekpo-txz01, "Short Text"
            matnr TYPE ekpo-matnr, "Material Number"
            ematn TYPE ekpo-ematn, "Material Number"
            bukrs TYPE ekpo-bukrs, "Company Code"
            werks TYPE ekpo-werks, "Plant"
            lgort TYPE ekpo-lgort, "Storage Location"
            bednr TYPE ekpo-bednr, "Requirement Tracking Number"
            matkl TYPE ekpo-matkl,
            infnr TYPE ekpo-infnr,
            netpr TYPE ekpo-netpr,
            netwr TYPE ekpo-netwr,
            brtwr TYPE ekpo-brtwr,
            spinf TYPE ekpo-spinf,
            prsdr TYPE ekpo-prsdr,
            prdat TYPE ekpo-prdat,
            effwr TYPE ekpo-effwr,
       end of t_final.

DATAit_final TYPE STANDARD TABLE OF t_final,
        wa_final TYPE t_final.
DATAit_ekko TYPE STANDARD TABLE OF t_ekko,
        wa_ekko TYPE t_ekko.

DATAit_ekpo TYPE STANDARD TABLE OF t_ekpo,
        wa_ekpo TYPE t_ekpo.




DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
        wa_fieldcat TYPE slis_fieldcat_alv.

DATA : it_fieldcat1 TYPE slis_t_fieldcat_alv,
        wa_fieldcat1 TYPE slis_fieldcat_alv.


DATAg_layout TYPE slis_layout_alv.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_ebeln for ekko-ebeln.

SELECTION-SCREEN END OF BLOCK b1.

INITIALIZATION.

START-OF-SELECTION.
   PERFORM dataget.
   PERFORM fieldcat.
   PERFORM grid.
   PERFORM fieldcat1.
   PERFORM grid1.


form dataget.
   SELECT ebeln from ekko INTO TABLE it_ekko
     WHERE ebeln IN s_ebeln.

   SELECT ebeln loekz statu aedat txz01 matnr ematn bukrs werks lgort bednr
           FROM ekpo INTO TABLE it_ekpo
           FOR ALL ENTRIES IN it_ekko
             WHERE ebeln = it_ekko-ebeln.


   IF it_ekpo IS NOT INITIAL.

     LOOP AT it_ekpo INTO wa_ekpo.

       wa_final-ebeln = wa_ekpo-ebeln.
       wa_final-loekz = wa_ekpo-loekz.
       wa_final-statu = wa_ekpo-statu.
       wa_final-aedat = wa_ekpo-aedat.
       wa_final-txz01 = wa_ekpo-txz01.
       wa_final-matnr = wa_ekpo-matnr.
       wa_final-ematn = wa_ekpo-ematn.
       wa_final-bukrs = wa_ekpo-bukrs.
       wa_final-werks = wa_ekpo-werks.
       wa_final-lgort = wa_ekpo-lgort.
       wa_final-bednr = wa_ekpo-bednr.

       APPEND wa_FINAL to it_FINAL.



       CLEAR wa_ekpo.


     Endloop.

   ENDIF.
endform.                    "dataget


form fieldcat.
   wa_fieldcat-col_pos = '0'.
   wa_fieldcat-fieldname = 'EBELN'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Purchasing Document Number'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.


   wa_fieldcat-col_pos = '1'.
   wa_fieldcat-fieldname = 'LOEKZ'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Deletion Indicator'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.


   wa_fieldcat-col_pos = '2'.
   wa_fieldcat-fieldname = 'STATU'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'RFQ status'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.


   wa_fieldcat-col_pos = '3'.
   wa_fieldcat-fieldname = 'AEDAT'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Purchasing Document Item Change Date'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '4'.
   wa_fieldcat-fieldname = 'TXZ01'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Short Text'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '5'.
   wa_fieldcat-fieldname = 'MATNR'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Material Number'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '6'.
   wa_fieldcat-fieldname = 'EMATN'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Material Number 1'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '7'.
   wa_fieldcat-fieldname = 'BUKRS'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Company Code'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '8'.
   wa_fieldcat-fieldname = 'WERKS'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Plant'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '9'.
   wa_fieldcat-fieldname = 'LGORT'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Storage Location'.

   APPEND wa_fieldcat to it_fieldcat.

   CLEAR wa_fieldcat.

   wa_fieldcat-col_pos = '10'.
   wa_fieldcat-fieldname = 'BEDNR'.
   wa_fieldcat-tabname = 'IT_FINAL'.
   wa_fieldcat-outputlen = '20'.
   wa_fieldcat-seltext_l = 'Requirement Tracking Number'.

   APPEND wa_fieldcat to it_fieldcat.



endform.                    "fieldcat


form grid.

   g_layout-colwidth_optimize = 'X'.

   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
*              I_INTERFACE_CHECK                 = ' '
*              I_BYPASSING_BUFFER                = ' '
*              I_BUFFER_ACTIVE                   = ' '
*              I_CALLBACK_PROGRAM                = ' '
*              I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS'
                I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
*              I_CALLBACK_TOP_OF_PAGE            = ' '
*              I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*              I_CALLBACK_HTML_END_OF_LIST       = ' '
*              I_STRUCTURE_NAME                  =
*              I_BACKGROUND_ID                   = ' '
*              I_GRID_TITLE                      =
*              I_GRID_SETTINGS                   =
       IS_LAYOUT                         = g_layout
       IT_FIELDCAT                       = it_fieldcat
*              IT_EXCLUDING                      =
*              IT_SPECIAL_GROUPS                 =
*              IT_SORT                           =
*              IT_FILTER                         =
*              IS_SEL_HIDE                       =
*              I_DEFAULT                         = 'X'
*              I_SAVE                            = ' '
*              IS_VARIANT                        =
*              IT_EVENTS                         =
*              IT_EVENT_EXIT                     =
*              IS_PRINT                          =
*              IS_REPREP_ID                      =
*              I_SCREEN_START_COLUMN             = 0
*              I_SCREEN_START_LINE               = 0
*              I_SCREEN_END_COLUMN               = 0
*              I_SCREEN_END_LINE                 = 0
*              I_HTML_HEIGHT_TOP                 = 0
*              I_HTML_HEIGHT_END                 = 0
*              IT_ALV_GRAPHICS                   =
*              IT_HYPERLINK                      =
*              IT_ADD_FIELDCAT                   =
*              IT_EXCEPT_QINFO                   =
*              IR_SALV_FULLSCREEN_ADAPTER        =
*            IMPORTING
*              E_EXIT_CAUSED_BY_CALLER           =
*              ES_EXIT_CAUSED_BY_USER            =
     TABLES
       T_OUTTAB                          = it_final
*            EXCEPTIONS
*              PROGRAM_ERROR                     = 1
*              OTHERS                            = 2
             .
   IF SY-SUBRC <> 0.

   ENDIF.
endform.                    "grid





FORM USER_COMMAND USING USER_COMMAND TYPE SY-UCOMM
                     SEL TYPE SLIS_SELFIELD.

   DATA:SO(10) TYPE N.
*  IF SEL-FIELDNAME = 'EBELN'.

   IF SY-UCOMM = '&IC1'.
     SO = SEL-VALUE.
   ENDIF.

   SELECT ebeln matkl infnr netpr netwr brtwr spinf prsdr prdat effwr
         FROM ekpo INTO TABLE it_ekpo
         WHERE ebeln = SO.
endform.

form fieldcat1.

   wa_fieldcat1-col_pos = '0'.
   wa_fieldcat1-fieldname = 'EBELN'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Purchasing Document Number'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '1'.
   wa_fieldcat1-fieldname = 'MATKL'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Material Group'.

   APPEND wa_fieldcat1 to it_fieldcat.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '2'.
   wa_fieldcat1-fieldname = 'INFNR'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Purchasing Info Record'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '3'.
   wa_fieldcat1-fieldname = 'NETPR'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Net Price in Purchasing Document'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '4'.
   wa_fieldcat1-fieldname = 'NETWR'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Net Order Value in PO Currency'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '5'.
   wa_fieldcat1-fieldname = 'BRTWR'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Gross order value in PO currency'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '6'.
   wa_fieldcat1-fieldname = 'SPINF'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Update Info Record'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '7'.
   wa_fieldcat1-fieldname = 'PRSDR'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Price Printout'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '8'.
   wa_fieldcat1-fieldname = 'PRDAT'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Date of Price Determination'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

   wa_fieldcat1-col_pos = '9'.
   wa_fieldcat1-fieldname = 'EFFWR'.
   wa_fieldcat1-tabname = 'IT_FINAL'.
   wa_fieldcat1-outputlen = '20'.
   wa_fieldcat1-seltext_l = 'Effective value of item'.

   APPEND wa_fieldcat1 to it_fieldcat1.

   CLEAR wa_fieldcat1.

  endform.                  "fieldcat1


form grid1.


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
*       I_INTERFACE_CHECK                 = ' '
*       I_BYPASSING_BUFFER                = ' '
*       I_BUFFER_ACTIVE                   = ' '
*       I_CALLBACK_PROGRAM                = ' '
*       I_CALLBACK_PF_STATUS_SET          = ' '
*       I_CALLBACK_USER_COMMAND           = ' '
*       I_CALLBACK_TOP_OF_PAGE            = ' '
*       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*       I_CALLBACK_HTML_END_OF_LIST       = ' '
*       I_STRUCTURE_NAME                  =
*       I_BACKGROUND_ID                   = ' '
*       I_GRID_TITLE                      =
*       I_GRID_SETTINGS                   =
*       IS_LAYOUT                         =
         IT_FIELDCAT                       = it_fieldcat1
*       IT_EXCLUDING                      =
*       IT_SPECIAL_GROUPS                 =
*       IT_SORT                           =
*       IT_FILTER                         =
*       IS_SEL_HIDE                       =
*       I_DEFAULT                         = 'X'
*       I_SAVE                            = ' '
*       IS_VARIANT                        =
*       IT_EVENTS                         =
*       IT_EVENT_EXIT                     =
*       IS_PRINT                          =
*       IS_REPREP_ID                      =
*       I_SCREEN_START_COLUMN             = 0
*       I_SCREEN_START_LINE               = 0
*       I_SCREEN_END_COLUMN               = 0
*       I_SCREEN_END_LINE                 = 0
*       I_HTML_HEIGHT_TOP                 = 0
*       I_HTML_HEIGHT_END                 = 0
*       IT_ALV_GRAPHICS                   =
*       IT_HYPERLINK                      =
*       IT_ADD_FIELDCAT                   =
*       IT_EXCEPT_QINFO                   =
*       IR_SALV_FULLSCREEN_ADAPTER        =
*     IMPORTING
*       E_EXIT_CAUSED_BY_CALLER           =
*       ES_EXIT_CAUSED_BY_USER            =
   TABLES
     T_OUTTAB                          = it_final
*     EXCEPTIONS
*       PROGRAM_ERROR                     = 1
*       OTHERS                            = 2
           .
IF SY-SUBRC <> 0.

ENDIF.



ENDFORM.    


Can anyone help?


Thanks in advance.  

 

Regards,

karan


BAPI Sales Order create with reference Invoice document

$
0
0

Hi

  I am using BAPI ''SD_SALESDOCUMENT_CREATE''  to create debit memo request with reference Invoice document.

  First time its successfully created with reference Invoice.When i am going to create 2nd time debit memo request with  same reference Invoice and item

  no its giving following error.

      Reference quantity:              10 EA (total referenced:              40 EA)

       Error in SALES_ITEM_IN 000010

       Condition ZSLS is not allowed as header condition

       Sales document  was not changed

 

    Please help any one to resolved this issue.

 

   Regards

   Shyam

How do we know if the transaction is calling from another transaction ?

$
0
0

Hi experts,

i have two transactions z1 and z2 ,when calling z2 from z1 how would i know z2 is calling from z1 ?

is there any way to know?

tst03 table table entries not updating

$
0
0

hi all, i had an issue of tst03 table entries.In development and quality for tst03 table entries where showing but in production tst03 table entries where showing zero what was the reason kindly suggest me.....

update KONV table without using FM KONV_UPDATE

$
0
0

Hi Team,

 

Please give me the FM and BAPI to update KONV table without using FM UPDATE_KONV.

 

Regards,

Raksha

Need Suggestion-Plz Help !!!!

$
0
0

Hi Experts .....

 

 

 

I need your valuable suggestions ......

 

 

I've good knowledge in SAP ABAP & WD also . I've decided to do SAP BPC course .

 

 

Is the decision of mine will help me ???!!!!! Should I go for the BPC module ???

 

 

 

Thanks in Adv.

 

 

Bunty

Viewing all 8332 articles
Browse latest View live


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