Quantcast
Channel: SCN: Message List - ABAP Switching, Enhancing, and Adapting Standard Programs
Viewing all 2464 articles
Browse latest View live

Re: How to get PGI data in sd

$
0
0

yes,I have used for all entries  and got data from three tables but problem is there i have to use two loop -endloop in side read statemnent.So can u help me for that is it correct way or not.

my code is.

SORT:t_vbuk,t_vbfa,i_tab[].

   LOOP AT t_vbuk INTO wa_vbuk.

     LOOP AT t_vbfa INTO wa_vbfa WHERE vbeln = wa_vbuk-vbeln.

       READ TABLE i_tab WITH KEY vbeln = wa_vbfa-vbelv

                                 posnr = wa_vbfa-posnv.

       wa_ttab = i_tab.

       APPEND wa_ttab TO t_tab.

       CLEAR wa_ttab.

     ENDLOOP.

   ENDLOOP.

   REFRESH i_tab[].

   i_tab[] = t_tab.

   CLEAR t_tab.


Re: How to get PGI data in sd

$
0
0

Hi Nishant,

After use for all entries in select querie i have used below code for get output.But i don't know is it correct way or not.Can you help me for that.

 

my code is.

 

SORT:t_vbuk,t_vbfa,i_tab[].

   LOOP AT t_vbuk INTO wa_vbuk.

     LOOP AT t_vbfa INTO wa_vbfa WHERE vbeln = wa_vbuk-vbeln.

       READ TABLE i_tab WITH KEY vbeln = wa_vbfa-vbelv

                                 posnr = wa_vbfa-posnv.

       wa_ttab = i_tab.

       APPEND wa_ttab TO t_tab.

       CLEAR wa_ttab.

     ENDLOOP.

   ENDLOOP.

   REFRESH i_tab[].

   i_tab[] = t_tab.

   CLEAR t_tab.

Enhance Standard class attributes

$
0
0

Hi ,

 

I have a Standard class of method A and B . The requirement is like i need to create a global attribute in a class so that i copy certain values from method A to global attibute  in order fill certain values in B from tha same global attribute..

 

Is this possible to create global attribute?

 

Thanks

 

Vijay

Re: Enhance Standard class attributes

$
0
0

yes, so long as it is within the same session

 

in class X set your global (public) attribute...

 

in the a & b methods of class Y you can read in the global attribute you set in class X and so on..

 

if it is a standard class you will have to use the Enhance feature to add your parameters....that you want to set...

Re: Enhance Standard class attributes

$
0
0

Hi steve,

 

It is a standard class, like i should use implicit enhancement to read a value to this global attribute,?

Re: User-exit that is triggered when a user changes/add a partner function VA02

$
0
0

Hi Guys,

 

we have similar situation in our project. Did anyone used any user exit/BADI/Implict which gets triggered when you add/change/delete partners at line item in Sales order?

 

Regards,

Suman

Re: Enhance Standard class attributes

$
0
0

Sorry - I am confused about your problem.

I do know you have a standard class and want to enhance it to add the public attribute.

You can create the public attribute using the Enhance menu option

 

enhance_attr.jpg

 

I


After you have created the attribute(s) you need - how will you set it? in your own code externally to the class or within a method that you call of the class? I assume the latter - well I would suggest try using an implicit enhancement at the end of the method to write the value to the attribute.

 

You can read that back in your external coding...for the lifetime of your session

Re: How to get PGI data in sd

$
0
0

HI PRADEEP KUMAR PADHY,

The code is fine and should work.

Replace the second loop with a Read Table and sort all three tables with SORT <Tablename> by vbeln ASCENDING statement for performance enhancement.

 

Regards,

Nishant


Calling a driver program by submit in user exit for PGI

$
0
0

Hi Gurus,

I have a question regarding post goods issue (PGI) for transaction vl01n,vl02n and vl06g.

earlier i have created a smartofrm and a driver program for sending the form output attachment in a mail after delivery posting manually.


for this i have created a smartform and driver program in which all the logic to attach and mail send is written on delivery posting.


but now customer want this fucntionality on Post goods issue (PGI), when user go to trasaction vl01n ,vl02n and vlo6g and pressing PGI button,

then mail should be sent automatically with for output attachment.


i have found a user exit which is being triggerd on PGI press MV50AFZ1 in which implemented the implecit enhancement in perform

user_exit_save_document_prepeare with below code.


ENHANCEMENT1  ZPGI_MAIL_SEND.    "active version
DATA c_zlf TYPE likp-lfart.
IF sy-ucomm = 'WABU_T'and xlikp-lfart = c_zlf.
SUBMIT ZSD_DECLARATION_CONFORMITY ANDRETURN.
ENDIF.
ENDENHANCEMENT.


After going to transaction vl02n i am putting unposted delivery number and clicking on PGI button.

in debugging its going to condition check for ucomm for PGI buttion and delivery type.


if condtion is fullfiled and curser going further on submit statement, but without executing the driver program ZSD_DECLARATION_CONFORMITY it coming out of enhancement.


its not performing the task which is develped in the driver program.


Please help me with the submit statement structure if i am missing any or other solution for my problem.


Br,

Surya



How to display ALV after Method 'SET_TABLE_FOR_FIRST_DISPLAY'

$
0
0

Hi to everyone,

 

It’s the first time I am using Method “SET_TABLE_FOR_FIRST_DISPLAY” and I would like to
know how to force the ALV to be displayed right after executing the method.

 

I’ve look at other discussions but I am more confused than anything else.

 

I was using the FM “REUSE_ALV_GRID_DISPLAY_LVC” and I was able to do some coding right
after it. I had some problems displaying some drop down field so that is why I switched
to Method “SET_TABLE_FOR_FIRST_DISPLAY”.

 

My coding was included in a BADI and I do not have much control on the PBO and PAI
modules.

 

       DATA: lt_dral TYPE lvc_t_dral,
            ls_dral
TYPE lvc_s_dral,
            g_grid 
TYPE REF TO cl_gui_alv_grid.

 

  CREATE OBJECT g_grid
   
EXPORTING
      i_parent
= cl_gui_container=>default_screen.

 

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
     
EXPORTING
        i_structure_name
= 'ZWM_REASON_MVT'
     
CHANGING
        ct_fieldcat     
= i_fieldcat_alv_lvc.

   
LOOP AT i_fieldcat_alv_lvc INTO wa_fieldcat_alv_lvc.
     
CASE wa_fieldcat_alv_lvc-fieldname.
       
WHEN 'GRUND'.
          wa_fieldcat_alv_lvc
-edit       = 'X'.
          wa_fieldcat_alv_lvc
-drdn_field = 'DROP_DOWN_HANDLE'.
          wa_fieldcat_alv_lvc
-drdn_alias = 'X'.
          wa_fieldcat_alv_lvc
-outputlen = 10.
     
ENDCASE.

     
MODIFY i_fieldcat_alv_lvc FROM wa_fieldcat_alv_lvc.
   
ENDLOOP.

    g_grid
->set_drop_down_table( it_drop_down_alias = lt_dral ).

   
CALL METHOD g_grid->set_table_for_first_display
     
EXPORTING
        i_structure_name             
= 'ZWM_REASON_MVT'
        is_layout                    
= gs_layout
     
CHANGING
        it_outtab                    
= gt_outtab
        it_fieldcatalog              
= i_fieldcat_alv_lvc
     
EXCEPTIONS
        invalid_parameter_combination
= 1
        program_error                
= 2
        too_many_lines               
= 3
       
OTHERS                        = 4.

   
CALL METHOD g_grid->set_ready_for_input
     
EXPORTING
        i_ready_for_input
= 1.

 

 

Please let me know what I should do to force the ALV display after the method is executed.

 

Thank you very much for providing any detailed help.

 

Sylvain

Convert Class-local types

$
0
0

Hi Colleague,

 

I have tried to implement note 1803980 in our landscape. As per the correction instruction  Manual Pre-Implement,

convert the class include structure of the class CL_IM_HRRCF00_INBD_NEWMOD using transaction SE24, menu option "Utilities -> Convert class-local types".

 

But Convert class local types option is  is non editable, could you please guide us, how to achive this. Thanks in advance.

 

Thanks & Regards,

Hemachandran.R

ERNAM in "ME_PROCESS_REQ_CUST"

$
0
0

Hi Experts,

 

I have written code for BADI "ME_PROCESS_REQ_CUST" method "OPEN".

 

DATA: l_preq TYPE MEREQ_item.

CALL METHOD IM_HEADER->get_data

RECEIVING

re_data = l_preq.

 

and the problem is field "l_preq-ERNAM" is showing some numeric value instead of user id.

as per my observation, BADI original language is "German". Kindly suggest.

Re: ERNAM in "ME_PROCESS_REQ_CUST"

$
0
0

Check signature of the get_data method (MEREQ_HEADER not MEREQ_ITEM )

 

NB: To get item(s) use GET_ITEMS and then in a LOOP use GET_DATA on items.

 

Regards,

Raymond

Re: Calling a driver program by submit in user exit for PGI

$
0
0


Hello Surya,

 

You made the enhancement in the  form: user_exit_save_document_prepeare

 

To my opinion you should do this in

 

*---------------------------------------------------------------------*

* FORM USEREXIT_SAVE_DOCUMENT *
*---------------------------------------------------------------------*
* This userexit can be used to save data in additional tables *
* when a document is saved. *
* *
* If field T180-TRTYP contents 'H', the document will be *
* created, else it will be changed. *
* *
* This form is called at from form BELEG_SICHERN, before COMMIT *
* *

 

*---------------------------------------------------------------------*

 

Re: Calling a driver program by submit in user exit for PGI

$
0
0

Thanks Kees,

i tried with your suggesion but still the same problem.

not going into program  ZSD_DECLARATION_CONFORMITY.


Re: Calling a driver program by submit in user exit for PGI

$
0
0

Hi Surya

 

Saw your post on linkedin.

 

Does it have to be a program? Maybe try call it in a RFC as a separate process

 

CALL FUNCTION 'ZSD_DECLARATION_CONFORMITY' IN BACKGROUND TASK AS SEPARATE UNIT

 

Secondly I would put in a endless loop.

 

DATA: lv_flag.

 

WHILE lv_flag = space.

"Do nothing

endwhile.

 

See if the process is running in SM50 then you can debug this application. Change lv_flag to X and you can continue to step through and debug.

 

Hope this helps.

 

CHeers

Brad

Sample Code for Order Updation

$
0
0

Hi Experts

 

I have a requirement , when ever I save a particular Type of Sales Order say ZRAB ,(which is basically a credit note ) , I need to update the Header->text .

 

Now I want whenever a user creates ZRAB Order and if he dont update the Text part the Order would throw error as " Please update the text with Original Invoice No.".

 

 

How to proceed ?

 

Thanks

MM_sD

Need some docs regarding Dolphin

Re: How to get PGI data in sd

$
0
0

Hi Nishant,

 

If i don't use second loop then i am getting wrong out put means i am not getting duplicat entries.

 

Thanks.

Re: How to get PGI data in sd

$
0
0

Hi,

 

you can  use only one  loop for vbfa,  and use read table for vbuk,(header table).

 

Regards,

Venkat

Viewing all 2464 articles
Browse latest View live


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