Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Working with Checkbox and Dropdown in Modulepool Programming

Former Member
0 Likes
3,607

Hi,

I am new to Modulepool Programming.I am working with MIGO Transaction,whenever i entered Material Document Number this checkbox and dropdownfield is automatically default.I want to place one check box and Dropdown with 3 values .Here i am attching image with checkbox and dropdown with collective slip value.Please help me.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,442

Hi Sai,

MIGO is a standard transaction and the message is standard behavior.

If you want to add new fields in MIGO there are lot of examples available on net.

SAPTechnical.COM - Implementing Screen-exit for transaction MIGO

Read the documentation of BADI MB_MIGO_BADI.. it has sample code also and it is all you need.

Regards

13 REPLIES 13
Read only

Former Member
0 Likes
3,443

Hi Sai,

MIGO is a standard transaction and the message is standard behavior.

If you want to add new fields in MIGO there are lot of examples available on net.

SAPTechnical.COM - Implementing Screen-exit for transaction MIGO

Read the documentation of BADI MB_MIGO_BADI.. it has sample code also and it is all you need.

Regards

Read only

0 Likes
3,442

Hi Mohammed,

Thank you for responding my question.Actually i already ave one layout which is attached below.For that layout i will add check box along with drop down like in your given screenshot in MIGO. When you compared to MIGO transaction it is clear to you.Please help me.

In the above screen i want to add check box and drop down with 3 values after invoice date.This is previously done by someone.

Read only

0 Likes
3,442

Hi Sai,

On the PO press F1 then press the technical information icon in the toolbar of the help window

Here you can see the Screen number and name of program

In SE51 put this and you can change the screen

Add a checkbox and give the variable name as the name to map it.

check this program DEMO_DYNPRO_DROPDOWN_LISTBOX to add a dropdown.

Let me know if you need more help

Regards

Read only

0 Likes
3,442

Hi Mohammed,

Thank You so much...I have already seen this Program.But i didn't understand.I have taken WEVER field from MKPF,for that field 3 values are there in mkpf table,those 3 values i have to pass to drop down.Even befor i used BAPI function module,in that i will pass this variable.I don't know how to do this.But i will try with this given program.If you know more please let me know.Thanks

Read only

0 Likes
3,442

Hi Mohammed,

Here i am adding my code and screens for check box and drop down with attributes for field WEVER with drop down.Once u check it..If any changes need please change.Actually for WEVER field in table we have values

1 individual slip

2 individual slip with some text

3 Collective slip

Thanks

TYPE-POOLS : VRM.

  DATA: ld_field    TYPE VRM_ID ,

        it_listbox  TYPE VRM_VALUES,

        wa_listbox  LIKE LINE OF it_listbox.

  DATA: it_mkpf type STANDARD TABLE OF mkpf,

        wa_mkpf type mkpf.

  SELECT *

    up to 10 rows

    from mkpf

    into table it_mkpf.

    loop at it_mkpf into wa_mkpf.

    wa_listbox-key = '1'.

    wa_listbox-text = wa_mkpf-wever.

    append wa_listbox to it_listbox.

  endloop.

  ld_field = 'MKPF-WEVER'.

  CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

      id     = ld_field

      values = it_listbox.

Read only

0 Likes
3,442

Hi Sai,

The above code will put the values from MKPF....

Also the data will keep only 1 as index and it is not mandatory it will have the right data.

You need to hard code it.

Delete this code

DATA: it_mkpf type STANDARD TABLE OF mkpf,

        wa_mkpf type mkpf.

  SELECT *

    up to 10 rows

    from mkpf

    into table it_mkpf.

    loop at it_mkpf into wa_mkpf.

    wa_listbox-key = '1'.

    wa_listbox-text = wa_mkpf-wever.

    append wa_listbox to it_listbox.

  endloop.

In the PBO write this.

    wa_listbox-key = '1'.

    wa_listbox-text = 'Individual Slip'.

    append wa_listbox to it_listbox.

    wa_listbox-key = '2'.

    wa_listbox-text = 'Individual Slip - Text'.

    append wa_listbox to it_listbox.

    wa_listbox-key = '3'.

    wa_listbox-text = 'Collective slip'.

    append wa_listbox to it_listbox.

  ld_field = 'MKPF-WEVER'.

  CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING

      id     = ld_field

      values = it_listbox.

It will work.

Read only

0 Likes
3,442

Thanks Mohammed,

I have one more requirement,I developed screen which is given below,in that i have added check box and drop down.Now my requirement is whenever i enter GRN,in drop down automatically selected Collective Slip(3) and check box also will be checked for printing purpose like in MIGO.(Form Printing).Please tell me how to do this.

Thanks

Read only

0 Likes
3,442

Activate the FCode in the screen for the list box so on selection of it the PAI will be triggered.

Then in the PAI user command check this FCode and the value as 3 if yes put the value as X for the checkbox variable.

Also I suppose I gave a correct answer not helpful for your earlier query....

Read only

0 Likes
3,442

Hi Mohammed,

Thanks a lot for your help,Now i have a requirement which is having lot of confusions for me.In MIGO whenever u will enter GRN, automatically the check box will be checked and type of print also automatically selected.Now my query is when u click on spool request for print preview it gives one popup which gives output type etc.Now in my developed screen i already placed check box and drop down for print version.How can i do for print preview.How to debug MIGO transaction.Please help me.

Thanks

Read only

0 Likes
3,442

Hi Sai,

Debugging MIGO will be tedious well the primary thing is for any standard print the config is done in NACE and accordingly the print is issued. Ask your functional for relvant output types to be triggered for the document types and trigger them accordingly.

Regards

Read only

0 Likes
3,442

Thanks,

I already asked to functional guy,he told that whenever we give GRN automatically check box is checked and print type is selected.In my developed screen i simply added check box and drop down for slip values.Now u will click on spool request and enter output type,then window will open ,in that we give output device for printing.Is there any code we have to write for that or no need.

Read only

0 Likes
3,442

Hi Sai,

Also check the table NAST from Standard after you post a transaction an entry will be created.

You will need this entry to post a print.

Sorry but here the functional should help you...

For your question on how to trigger it from your program copy and paste the code

SAP Community Network Wiki - ABAP Development - Process Output types through program

I suppose this is a new question and answer and appreciate if you can mark it helpful

To understand I am not sure how much this will help but have a look

SAP Community Network Wiki - ERP SCM - Output Determination in Inventory Management (IM)

Regards

Read only

0 Likes
3,442

Hi Mohammed,

Thanks for your more help.

I have question.

I have created PO through ME21n and i have released PO through ME 28,Now I will run my own screen for generating GRN For PO.In that screen i will enter my PO,it will displays the vendor details etc.then I will enter my EAN number for particular Material and ten press enter It will displays the item details which i entered in PO creation.Now in my screen i will select type of version print(WEVER) also,When i check in EKPO table the PO is Updated with material number.How to update my WEVER in MKPF table?or automatically it is updated or not?In my Module pool Programming i have used some BAPI Structures,in that i have pass WEVER variable also.Please help me.

Thanks